-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
111 projects page see more #142
base: main
Are you sure you want to change the base?
Conversation
…e when all pages have been loaded
Will have a look at this PR this weekend! |
Don't worry, I actually set this as a draft because I actually need to fix some things before I can make the PR! |
Seen! Will review tonight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recording.2024-10-20.022415.mp4
It's SO good 😍
I've got a few bugs to report before we merge, but I'm so excited.
- fetchPaginationStrapi typesafety
Yeah, ik you commented on this, I think it's quite important we have type safety/zod checking for this (see a bug later down). Since pagination is only used for this particular route, you're alg to make the pagination logic specific to the projects page (but if so, name it specifically and comment to explain that to avoid confusion) - First load
At the moment, it takes a split-second for the client component to load the initial set of projects from useEffect. Might be better if this was passed down from a parent client component then used as the initial state in useState? Will have with no-projects message too I bet - .toLocaleDateString()
I think this bug is being caused by our code/types thinking date is a Date type but actually it's a string.
You may need to use Strapi to coerce the date type into a string, just like with the regular fetchStrapi.
This goes hand-in-hand with type safety, I'm happy to jump on a call if you'd like! - Message if no projects
Just a heads up if we've got no projects in Strapi it looks like this
I kinda liked the 404 page but I think we have a better fix - conditionally render the projects component or a piece of "no projects" text. Probably easier to do after the first load stuff
Amd finally just transitioning from dev to production environments - might be good to up the page size from 2 to say 8? Oh and remove console.logs hehe
@@ -0,0 +1,7 @@ | |||
export function createDate(days: number, months: number, years: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to createRelativeDate or smth, tripped me up for a sec!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yo! This looks awesome! So impressive!!
I don't know nearly as much as Nate does about all of the zod stuff and strapi stuff and all of that, so from a repo architecture POV I don't have much to add. However, I did come across this problem -
which happened when I loaded a page, hit back, and then went back to the page (sorry tried to get a video but apparently it's too big). Should be fairly easy to replicate though I hope!
I agree with Nate about the load times and the lack of projects as well, but all good you already got his feedback on it.
Looks suuuuper awesome though I am SO impressed!! good stuff
… for button and text for when no projects are found
Context
We want the projects page to have a limited number of projects showing at each time, with a button that allows the client to load additional projects.
Closes #111
What Changed?
How To Review
Notes