fix: hide Preview/Copy Link in mobile menu when isPlatform=true
What does this PR do?
Fixes inconsistency in mobile menu for EventTypeSettings when using Platform API atoms. The desktop view correctly hides "Preview" and "Copy Link" buttons when isPlatform={true}, but the mobile dropdown menu (three dots) was showing these options regardless of the isPlatform flag.
Changes:
- Wrapped "Preview" and "Copy Link" menu items in mobile dropdown with
!isPlatformcheck - Ensures consistent UX between desktop and mobile views when using Platform API
- Matches the existing desktop implementation behavior
Why this matters: When using Cal.com atoms in a custom React app with OAuth clients, these links should not appear because they would point to incorrect URLs (cal.com instead of the configured booking redirect URI). This fix ensures the mobile menu behavior matches the desktop implementation.
Visual Demo
Before:
- Mobile menu showed "Preview" and "Copy Link" even when
isPlatform={true} - Inconsistent with desktop behavior where these buttons are hidden
After:
- Mobile menu hides "Preview" and "Copy Link" when
isPlatform={true} - Consistent behavior across desktop and mobile views
Mandatory Tasks
- [x] I have self-reviewed the code
- [x] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - no documentation changes needed
- [x] I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - this is a UI consistency fix that aligns mobile with existing desktop behavior
How should this be tested?
- Open EventTypeSettings in a custom React app using Cal.com atoms with
isPlatform={true} - Switch to mobile view (responsive mode or actual mobile device, viewport < 1024px)
- Click the three dots menu (⋯) next to the Save button
- Expected: "Preview" and "Copy Link" options should NOT appear in the menu
- Expected: Only "Delete" and other non-platform-specific options should be visible
- Verify desktop view still works correctly (buttons hidden when
isPlatform={true})
Test Configuration:
- Use a custom React app with
EventTypeSettingsatom component - Set
isPlatform={true}prop - Test on mobile viewport (< 1024px width)
Checklist
- I have read the [contributing guide
- My code follows the style guidelines of this project
- I have checked if my changes generate no new warnings
@taneja-garvit is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.