Skip to content
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: added server preconnect url improving the page load time #10554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RajvirS99
Copy link

fixes #10236

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added a server preconnect feature to improve page load times by establishing early connections to the server URL.

  • Created new component packages/twenty-front/src/modules/ui/utilities/server-preconnect/components/ServerPreconnect.tsx that uses react-helmet-async to add preconnect link tags
  • Added ServerPreconnect component to the component tree in AppRouterProviders.tsx within the StrictMode section
  • Implementation properly uses environment variable REACT_APP_SERVER_BASE_URL with fallback to localhost:3000
  • This optimization reduces connection setup time when making requests to the server, addressing issue Add Preconnect if the server url isn't the same as backend url #10236
  • Follows the same pattern as other Helmet-based components like PageTitle and PageFavicon

💡 (2/5) Greptile learns from your feedback when you react with 👍/👎!

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 071096f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Preconnect if the server url isn't the same as backend url
1 participant