-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: adding https in checkurltype #6295
fix: adding https in checkurltype #6295
Conversation
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
- Modified
/packages/twenty-front/src/utils/checkUrlType.ts
- Added check to prepend "https://" if URL lacks protocol
- Ensures proper handling of LinkedIn and Twitter links
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
This reverts commit 4524913.
Never blindly follow AI 😜 |
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
(updates since last review)
- Updated
/packages/twenty-front/src/modules/ui/field/display/components/LinkDisplay.tsx
to prepend 'https://' to URLs missing a protocol - Removed protocol prepending logic from
/packages/twenty-front/src/utils/checkUrlType.ts
- Ensured consistent URL handling across components
- Watch for any unintended side effects in URL formatting
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
@@ -18,6 +18,12 @@ export const LinkDisplay = ({ value }: LinkDisplayProps) => { | |||
return <></>; | |||
} | |||
|
|||
const absoluteUrl = url |
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.
we should leverage existing utils here :)
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.
Yes good point, might as well change it here too then,
https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/ui/field/display/components/URLDisplay.tsx#L32
Fix URL handling for LinkedIn and Twitter links
Fixes #6287
Solution
Updated
checkUrlType
function to prepend "https://" to URLs if missing, ensuring proper handling of social media links.Changes
/packages/twenty-front/src/utils/checkUrlType.ts