fix: cross domain SVG sprites (#16244)

This commit is contained in:
Omar López authored and GitHub committed 2024-08-16 16:33:10 +00:00
1 parent aab9193e7b
commit 101fea2c1c
10 files changed
+53 -3

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ function Icon({
}) {
return (
<svg height={size} width={size} {...props} aria-hidden>
<use href={`/icons/sprite.svg#${name}`} />
<use href={`#${name}`} />
</svg>
);
}
@@ -0,0 +1,12 @@
import * as React from "react";
import SVG from "react-inlinesvg";
export function IconSprites() {
return (
<SVG
src={`${process.env.NEXT_PUBLIC_WEBAPP_URL}/icons/sprite.svg?v=${process.env.NEXT_PUBLIC_CALCOM_VERSION}`}
/>
);
}
export default IconSprites;
+1
View File
@@ -203,3 +203,4 @@ export type { OrgBannerProps } from "./components/organization-banner";
export { StorybookTrpcProvider } from "./components/mocks/trpc";
export { default as Icon } from "./components/icon/Icon";
export type { IconName } from "./components/icon/icon-names";
export { IconSprites } from "./components/icon/IconSprites";
+1
View File
@@ -48,6 +48,7 @@
"react-colorful": "^5.6.0",
"react-day-picker": "^8.10.1",
"react-hook-form": "^7.43.3",
"react-inlinesvg": "^4.1.3",
"react-select": "^5.7.0",
"react-virtual": "^2.10.4"
},