Free-Code-Camp-Seoul / fcc-seoul-website

FCC Seoul Website
https://fcc-seoul.fly.dev
5 stars 8 forks source link

Members #50

Closed GMSoudersJr closed 5 months ago

GMSoudersJr commented 5 months ago

Centered Content

fCC Seoul Members Centered Content

Consistent Font-Size

fCC Seoul Events Title Consistent font-size

GMSoudersJr commented 5 months ago

The latest commit is my failed attempt at displaying a loading indicator.

GMSoudersJr commented 5 months ago

I tried both getStaticProps and getServerSideProps. Both did the same thing as far as I could tell. I must have implemented something wrong.

ivanms1 commented 5 months ago

could you try the following?

do you still see a loading? it should be instant now

GMSoudersJr commented 5 months ago

Thanks for the feedback.

The issue I have

With your suggestion

How often do we want the member list to update?

ivanms1 commented 5 months ago

However, if the spreadsheet is changed, the website does not get the updated information. ?

You are correct

IngetServerSideProps the fetch of the members blocks the rendering of page until that call is done, that's why suspense didn't work.

It looks like we have a couple of options

  1. Use getStaticProps. There is a revalidate option for getStaticProps but I am not sure if it works in fly.io. In the worst case scenario we would have redeploy often, maybe every Sunday?

  2. Move the loading logic to _app.tsx and do something similar to this. I am not a big fan of this.

  3. Move the member fetching logic to the client side (Members Page Component) and use something like react query or just plain fetch.

GMSoudersJr commented 5 months ago

So when would Suspense actually work? I'm confused.

  1. I think this is the best option. We can always test it. And like you said

    worst case scenario, we would have to redeploy often...

    • I tested revalidate with a short interval on a local build and it worked fine
  2. Seems like a bit much. I am also not a fan of that.
  3. Maybe a last resort.
GMSoudersJr commented 5 months ago

Does fly.io stop revalidation? How does the homepage stay current?

ivanms1 commented 5 months ago

let's do option 1 then

Does fly.io stop revalidation?

I am not sure, I can't find any sources stating that it does or it doesn't. I think we can just test it.

How does the homepage stay current?

It's using getServerSideProps

GMSoudersJr commented 5 months ago

getServerSideProps that's right. 바보야! I knew that

GMSoudersJr commented 5 months ago

I shared the Google Sheet with you

ivanms1 commented 5 months ago

Cool, I'll review this later today, we don't need the loading component anymore right?

GMSoudersJr commented 5 months ago

Loading removed

GMSoudersJr commented 5 months ago

Thanks. And thanks for the feedback