Skip to content

Add nuqs and tabs to switch between events user was reserved and in waitlist for in profile page#2982

Open
andrefkl wants to merge 5 commits intomainfrom
mono-832-events-in-profile-page-includes-events-the-user-was-not
Open

Add nuqs and tabs to switch between events user was reserved and in waitlist for in profile page#2982
andrefkl wants to merge 5 commits intomainfrom
mono-832-events-in-profile-page-includes-events-the-user-was-not

Conversation

@andrefkl
Copy link
Copy Markdown
Member

@andrefkl andrefkl commented Mar 4, 2026

image

We can use nuqs later to clean up the event filter states etc and add more state to the url in other places

@andrefkl andrefkl requested a review from junlarsen March 4, 2026 21:05
@linear
Copy link
Copy Markdown

linear bot commented Mar 4, 2026

Copy link
Copy Markdown
Member

@junlarsen junlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the url state as a zod schema preferably https://nuqs.dev/docs/parsers/community/zod-codecs

I do however think that this isn't really the right direction to do form-url syncing. I can show you tomorrow @andrefkl

Comment on lines +305 to +307
const submitEventTabsForm = eventTabsForm.handleSubmit(({ eventListTab }) => {
router.replace(`?eventListTab=${eventListTab}`, { scroll: false })
})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better way to handle this is to make the form not submittable, and instead just do it on change with subscribe()

https://react-hook-form.com/docs/useform/subscribe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants