-
Notifications
You must be signed in to change notification settings - Fork 12k
fix: atoms-in-browser #23250
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
Closed
Closed
fix: atoms-in-browser #23250
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
78fd6ad
fix-atoms-in-browser
hemantmm 09645f5
coderabbit suggestion
hemantmm d09d5e5
coderabbit suggestion
hemantmm 1599258
Merge branch 'main' into atoms-in-browser
Devanshusharma2005 efe4b17
Merge branch 'main' into atoms-in-browser
hemantmm 3f1fe82
Merge branch 'main' into atoms-in-browser
hemantmm aef40f6
Merge branch 'main' into atoms-in-browser
hemantmm 2efda98
Merge branch 'main' into atoms-in-browser
hemantmm 95ead5a
Merge branch 'main' into atoms-in-browser
hemantmm 87af7db
Merge branch 'main' into atoms-in-browser
hemantmm 147f69d
Merge branch 'main' into atoms-in-browser
hemantmm c5e2553
Merge branch 'main' into atoms-in-browser
hemantmm 74fb984
Merge branch 'main' into atoms-in-browser
hemantmm c99e05b
Merge branch 'main' into atoms-in-browser
hemantmm 664b15b
Merge branch 'main' into atoms-in-browser
hemantmm 4b2c658
Merge branch 'main' into atoms-in-browser
hemantmm 395d7a6
Merge branch 'main' into atoms-in-browser
pallava-joshi 9bee853
Merge branch 'main' into atoms-in-browser
pallava-joshi d6b6d2b
Merge branch 'main' into atoms-in-browser
pallava-joshi 4f6f2d7
fix: resolve duplicate keys in vite.config.ts define object
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,26 @@ | ||
| /* eslint-disable turbo/no-undeclared-env-vars */ | ||
| import SVG from "react-inlinesvg"; | ||
|
|
||
| // eslint-disable-next-line turbo/no-undeclared-env-vars | ||
| const vercelCommitHash = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA; | ||
| const commitHash = vercelCommitHash ? `-${vercelCommitHash.slice(0, 7)}` : ""; | ||
| // Use globalThis.process?.env or fallback to empty string for browser safety | ||
| const CALCOM_VERSION = | ||
| typeof process !== "undefined" && process.env && process.env.NEXT_PUBLIC_CALCOM_VERSION | ||
| ? process.env.NEXT_PUBLIC_CALCOM_VERSION | ||
| : ""; | ||
| const VERCEL_COMMIT_SHA = | ||
| typeof process !== "undefined" && process.env && process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA | ||
| ? process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA | ||
| : ""; | ||
|
|
||
| const commitHash = VERCEL_COMMIT_SHA ? `-${VERCEL_COMMIT_SHA.slice(0, 7)}` : ""; | ||
|
|
||
| export function IconSprites() { | ||
| return ( | ||
| <SVG | ||
| src={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/icons/sprite.svg?v=${process.env.NEXT_PUBLIC_CALCOM_VERSION}-${commitHash}`} | ||
| /> | ||
| ); | ||
| const WEBAPP_URL = | ||
| (typeof process !== "undefined" && process.env && process.env.NEXT_PUBLIC_WEBAPP_URL) || ""; | ||
| // Build URL robustly, avoid double slashes, and default to same-origin when WEBAPP_URL is unset. | ||
| const base = WEBAPP_URL.replace(/\/+$/, ""); | ||
| const path = "/icons/sprite.svg"; | ||
| const src = `${base}${path}?v=${CALCOM_VERSION}${commitHash}`.replace(/([^:]\/)\/+/g, "$1"); | ||
| return <SVG src={src} />; | ||
hemantmm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| export default IconSprites; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.