Closed benharvey1213 closed 2 years ago
What if we had separate pages for events? /events
for the base event page, then /events/:page_num
for the page number for pagination.
Taking a pass at this now, it'll get me up to speed with svelte
@zakpatterson Cool sounds good! For the pagination can you use query params? Realizing that /events/:slug
is a route that exists in SvelteKit right now and it wouldn't be good to break that. You can access query params on the params
object in the load
function in +page.server.ts
.
Also see these docs for how to do pagination with GROQ in Sanity. The GROQ for events is in src/lib/sanity/events.ts
.
Ah, I'll attempt to support the route based pagination, since the event data is being created manually by us I thought it would make sense indefinitely to ship all the data to the client and filter / paginate client side.
Might submit these as two prs.
@zakpatterson Oh shit nevermind, that makes MUCH more sense lol. Pagination with query params is something we should do if we pull events out into a separate page.
Ok, I haven't used vercel much, so I'll open a draft PR now and try out the deployment...
Don't want to show a million things at one time