cal.pub0.org/apps/web/lib
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
..
config Enforces explicit type imports (#7158) 2023-02-16 15:39:57 -07:00
core feat(web): improve session retrieval performance (#7584) 2023-03-10 23:45:24 +00:00
hooks Revert "Revert "I18N Caching (#6823)"" 2023-02-14 09:00:28 -07:00
mutations/bookings Feature/ Manage Booking Questions (#6560) 2023-03-02 11:15:28 -07:00
types Feature/ Manage Booking Questions (#6560) 2023-03-02 11:15:28 -07:00
QueryCell.tsx Enforces explicit type imports (#7158) 2023-02-16 15:39:57 -07:00
app-providers.tsx Enforces explicit type imports (#7158) 2023-02-16 15:39:57 -07:00
asStringOrNull.tsx Refactors EE code (#3490) 2022-07-28 13:58:26 -06:00
classNames.ts Add ui package for reusable components (#1916) 2022-02-21 09:41:25 -07:00
clock.ts #4533: Show correct time format on booking page (#4771) 2022-09-30 14:45:28 +02:00
cropImage.ts Migrated cal.com to apps/web 2022-02-10 14:22:45 -07:00
csp.ts Add sentry and WEBAPP_URL to whitelist (#7248) 2023-02-21 16:46:27 +00:00
ensureArray.ts Migrated cal.com to apps/web 2022-02-10 14:22:45 -07:00
getBooking.tsx Well, you can have 0 attendees in a booking (#7494) 2023-03-03 09:35:58 -07:00
hasKeyInMetadata.ts WIP stripe customer metedada sync (#3153) 2022-07-07 15:24:42 -06:00
isBrandingHidden.tsx Fixes SMS actions and cal.com branding for premium plan (#7306) 2023-02-23 15:01:51 -07:00
isPrismaObj.ts WIP stripe customer metedada sync (#3153) 2022-07-07 15:24:42 -06:00
parseDate.ts Fix booking time hydration error (#7253) 2023-03-11 00:24:01 +00:00
parseZone.ts Consolidates dayjs in a single package 2022-06-28 14:48:24 -06:00
profile.ts replaced gravatar default (#4158) 2022-09-05 10:23:39 +00:00
withEmbedSsr.tsx Enforces explicit type imports (#7158) 2023-02-16 15:39:57 -07:00
withNonce.tsx Enforces explicit type imports (#7158) 2023-02-16 15:39:57 -07:00