Skip to content

Commit ee5ce71

Browse files
committed
fix(onboarding): Use unique SVG IDs and correct feColorMatrix attribute
Use useId() for SVG filter/mask IDs to prevent collisions if multiple AnimatedSentryLogo instances render on the same page. Also fix feColorMatrix attribute from `mode` to `type` (the correct SVG attr).
1 parent 2a67c32 commit ee5ce71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

static/app/components/animatedSentryLogo.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {useId} from 'react';
12
import {useTheme} from '@emotion/react';
23

34
interface AnimatedSentryLogoProps {
@@ -34,8 +35,9 @@ export function AnimatedSentryLogo({
3435
className,
3536
}: AnimatedSentryLogoProps) {
3637
const theme = useTheme();
37-
const gooId = 'goo-layer';
38-
const maskId = 'mask-layer';
38+
const id = useId();
39+
const gooId = `goo-layer-${id}`;
40+
const maskId = `mask-layer-${id}`;
3941

4042
const dashOffset = DASH_TOTAL * (1 - progress);
4143

@@ -55,7 +57,7 @@ export function AnimatedSentryLogo({
5557
<feGaussianBlur in="SourceGraphic" stdDeviation="8" result="blur" />
5658
<feColorMatrix
5759
in="blur"
58-
mode="matrix"
60+
type="matrix"
5961
values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 36 -4"
6062
result="goo"
6163
/>

0 commit comments

Comments
 (0)