BuidlGuidl / grants.buidlguidl.com

https://grants-bg.vercel.app
MIT License
3 stars 3 forks source link

active grants page #134

Closed technophile-04 closed 1 month ago

technophile-04 commented 1 month ago

Description:

NOTE: We need to add index on "approvedAt" Please feel free to close this PR! Since it was just copy paste and we already displaying all WIP grants (checkout #133)

Currently we were showing full list of active grants in landing page itself in the table view. This PR's limit grants displayed on home page to 8 and then creates /active-grant page with cards view.

https://github.com/user-attachments/assets/8fe099a0-2b41-43c6-b272-211d36781ce6

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
grants-bg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 2:52pm
carletex commented 1 month ago

Thanks @technophile-04!!

At first, I thought about an admin route for this, but this makes sense too.

NOTE: We need to add index on "approvedAt"

Just created it, it's building atm.

Question: How is the new page being cached? I think we want it to be fresh all the time.

carletex commented 1 month ago

Oh, let's add a link to the new page in /admin! (maybe on the right corner? above completed grants)

technophile-04 commented 1 month ago

At first, I thought about an admin route for this, but this makes sense too.

Yeah even I had this in my mind but while tackling realised that it was already public so kept it as it.

Question: How is the new page being cached? I think we want it to be fresh all the time.

Ohh shit nice catch! actually it was completely static : Screenshot 2024-08-12 at 7 09 37 PM

Update at https://github.com/BuidlGuidl/grants.buidlguidl.com/pull/134/commits/26df0c3b6424659abc1f7345f3329bc27131d434 so get always fresh data.

let's add a link to the new page in /admin! (maybe on the right corner? above completed grants)

Yup, update at https://github.com/BuidlGuidl/grants.buidlguidl.com/pull/134/commits/20448e5063e73172f0ccaf27bf521c55929d5eda :

image

Not sure whats the best place, maybe we keep it at Header instead? and show only when admin is logged in?

carletex commented 1 month ago

Ohh shit nice catch! actually it was completely static :

I always forget how caching works in NextJS app router. But my mental model is that if you don't do anything explicit, probably the stuff is going to be cached :D

Not sure whats the best place, maybe we keep it at Header instead? and show only when admin is logged in?

I moved it here for now. Seems like a decent place that doesn't get in the middle.

image

carletex commented 1 month ago

Now that I'm seeing my pic I see that I missed the margin on the completed grants. Will hotfix :D

carletex commented 1 month ago

https://github.com/BuidlGuidl/grants.buidlguidl.com/commit/92f24a2ff399262738066ec58a68ea507a0578c7