cal.com
cal.com copied to clipboard
feat: Read event duration from URLs
What does this PR do?
A quick summary of changes made:
- The getDurationFromURL function extracts the duration from the URL.
- The useEffect sets the selectedDuration based on the URL parameter if it's valid and exists in the default options; otherwise, it sets the event's default length.
- The rendering logic now checks if a duration is specified in the URL. If so, it only displays that duration if it's one of the default options.
Please review the changes and let me know if there are any errors.
Fixes #13233
Type of change
- New feature (non-breaking change which adds functionality)
Checklist
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
@reubence is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
This PR introduced no changes to the JavaScript bundle! 🙌
@reubence hey can you post screenshot of how its working