-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(workspace): simplify hostname matching logic in WorkspaceProvider… #12365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Effect Replaced `getHostnamesFromWorkspaceUrls` with `isWorkspaceHostnameMatchCurrentLocationHostname` for streamlined hostname comparison, reducing redundancy and improving logic clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR streamlines workspace URL redirection by simplifying hostname matching logic in the WorkspaceProviderEffect component, ensuring proper redirection to custom domains before sign-in.
- Introduced
isWorkspaceHostnameMatchCurrentLocationHostname
inpackages/twenty-front/src/modules/workspace/components/WorkspaceProviderEffect.tsx
for more efficient URL comparison - Remove debug
console.log
statement inWorkspaceProviderEffect.tsx
before merging - Consider adding error handling for URL parsing in case of invalid workspace URLs
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/workspace/components/WorkspaceProviderEffect.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workspace/components/WorkspaceProviderEffect.tsx
Outdated
Show resolved
Hide resolved
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:9298 This environment will automatically shut down when the PR is closed or after 5 hours. |
…spaceProviderEffect
Let's make sure to test this well before deploy! |
twentyhq#12365) …Effect Replaced `getHostnamesFromWorkspaceUrls` with `isWorkspaceHostnameMatchCurrentLocationHostname` for streamlined hostname comparison, reducing redundancy and improving logic clarity. Fix twentyhq#12295
…Effect
Replaced
getHostnamesFromWorkspaceUrls
withisWorkspaceHostnameMatchCurrentLocationHostname
for streamlined hostname comparison, reducing redundancy and improving logic clarity.Fix #12295