Skip to content

Conversation

@tomski747
Copy link
Member

This pull request introduces a utility function, ensureUrlHasOrigin, to standardize handling of URLs by ensuring they include an origin. The function is integrated into multiple parts of the application to simplify and improve URL processing.

Addition of ensureUrlHasOrigin utility:

  • src/utils/url.ts: Added a new utility function, ensureUrlHasOrigin, which prepends the current window's origin to relative URLs or returns the original URL if it already includes an origin.

Integration of ensureUrlHasOrigin:

  • src/App.tsx: Updated the faviconUrlTemplate to use ensureUrlHasOrigin for consistent origin handling when constructing the favicon URL.
  • src/index.tsx: Replaced manual logic for constructing contentBaseUrl with the ensureUrlHasOrigin utility for cleaner and more reliable URL processing.

Import updates:

  • src/App.tsx: Added an import for ensureUrlHasOrigin to use the new utility.
  • src/index.tsx: Added an import for ensureUrlHasOrigin to facilitate its usage.

@vercel
Copy link

vercel bot commented May 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-hosting ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-dev-24111df ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-euc1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-rc ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-sandbox-us ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-star1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am
auth-hosting-star2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 0:27am

@tomski747 tomski747 requested a review from ariansvi May 6, 2025 12:27
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.

3 participants