chore: App Router Migration - Ensure `isBookingPage` is correctly flagged before being passed to `PageWrapper`
What does this PR do?
- For routes under
/[user]route group,isBookingPageis not correctly flagged in App Router. By modifyingWithLayoutfunction that is widely used in routes in/future, ensure thatisBookingPageis correctly flagged - Refactor so that
isBookingPageis done in/module, not in/pages(p.s. not every page exists in/module, so this effort should continue as I extract pages from/pagesinto `/module) - Fixes CAL-4169
Mandatory Tasks (DO NOT REMOVE)
- [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
- [ ] I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
- [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
- Manually navigate to the relevant pages in both Pages Router and App Router
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| cal | ⬜️ Ignored (Inspect) | Visit Preview | Aug 29, 2024 5:44pm | |
| calcom-web-canary | ⬜️ Ignored (Inspect) | Visit Preview | Aug 29, 2024 5:44pm |
@joeauyeung Hey Joe, thanks for the review. Good point, both /d/[link]/[slug] and /team/[slug] use isBookingPage flag. But for these pages, app router imports directly from /pages module, so there should be no problem. The error should've persisted only for the app router pages that import its client components from /modules while isBookingPage is flagged in /pages.
For /d/[link]/[slug] and /team/[slug] and other pages whose client components still exist in /pages, we can handle this isBookingPage flag issue as we migrate them into /modules (which should happen in separate PRs)