You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a next js app with the directory page system.
I have a folder called [[...options]], which enable to get url segments in the url, more details about that here
I would like parse the string[] containing the segments with zod server side.
exportconstVIEW_OPTIONS=['day','week','month','year']asconst;typeViewOption=(typeofVIEW_OPTIONS)[number];typeSegments=['booking',ViewOption,number,number,number]|[ViewOption,number,number,number];constcalendarOptionsSchema=z.union([z.tuple([z.literal('booking'),z.enum(VIEW_OPTIONS),z.number(),z.number(),z.number()]),z.tuple([z.enum(VIEW_OPTIONS),z.number(),z.number(),z.number()]),z.undefined(),]);constextractSegments=(options: Segments)=>{if(!calendarOptionsSchema.safeParse(options).success){// redirect to 404 pagenotFound();}// other stuff here}
I get this issue :
I looked on the internet, I have see nothing about this issue.
If you have an idea/an explanation, you are welcome. :)
The text was updated successfully, but these errors were encountered:
I am working on a next js app with the directory page system.
I have a folder called [[...options]], which enable to get url segments in the url, more details about that here
I would like parse the string[] containing the segments with zod server side.
I get this issue :
I looked on the internet, I have see nothing about this issue.
If you have an idea/an explanation, you are welcome. :)
The text was updated successfully, but these errors were encountered: