cal.pub0.org/apps
Sangboak Lee 229aeeb0c9
Fix booking time hydration error (#7253)
Root cause of the error is that both server and client try to parse date differently due to localStorage. Since server does not know localStorage when render initial HTML it renders page as if there is no value set for time format.
 On the other hand, client side know the value of time format when it tries to render.

To fix the issue, we force it to parse date with default format at the initial rendering time.

- Add `withDefaultTimeFormat` argument to `parseDate` function
- Add `withDefaultTimeFormat` argument to `parseRecurringDates` function
- Leverage useEffect to dynamically update `withDefaultTimeFormat` arg passed to function

Co-authored-by: sangboak.lee <sangboak.lee@woowahan.com>
Co-authored-by: zomars <zomars@me.com>
2023-03-11 00:24:01 +00:00
..
docs upgrade nextjs to 13.2 version and replace @next/font for in built ne… (#7440) 2023-02-28 16:38:46 -07:00
storybook feat: use next transpile packages feature (#7527) 2023-03-06 13:10:39 +00:00
swagger upgrade nextjs to 13.2 version and replace @next/font for in built ne… (#7440) 2023-02-28 16:38:46 -07:00
web Fix booking time hydration error (#7253) 2023-03-11 00:24:01 +00:00