cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: Read event duration from URLs

Open reubence opened this issue 1 year ago • 5 comments

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 avatar Jan 18 '24 09:01 reubence

@reubence is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 18 '24 09:01 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 18 '24 09:01 CLAassistant

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

github-actions[bot] avatar Jan 18 '24 09:01 github-actions[bot]

📦 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! 🙌

github-actions[bot] avatar Jan 18 '24 09:01 github-actions[bot]

@reubence hey can you post screenshot of how its working

vikaspatil0021 avatar Jan 18 '24 13:01 vikaspatil0021