Skip to content

Commit 205decf

Browse files
authored
fix(hydration issue): Fix tooltip position for test copy button (#82912)
**Before** both tooltips were active at the same time: ![SCR-20250103-nqhc](https://github.com/user-attachments/assets/4395eadf-e0fa-455f-a66f-3e9c7335840a) **After** one at a time <img width="137" alt="SCR-20250103-nqiu" src="https://github.com/user-attachments/assets/b147f3f3-eaa7-42d7-a990-6c959ea3066f" />
1 parent 7604cde commit 205decf

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

static/app/components/replays/diff/utils.tsx

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,47 +31,47 @@ interface BeforeAfterProps {
3131

3232
export function Before({children, offset, startTimestampMs}: BeforeAfterProps) {
3333
return (
34-
<Tooltip
35-
title={
36-
<LeftAligned>
37-
{t('The server-rendered page')}
38-
<div>
39-
<ReplayTooltipTime
40-
timestampMs={startTimestampMs + offset}
41-
startTimestampMs={startTimestampMs}
42-
/>
43-
</div>
44-
</LeftAligned>
45-
}
46-
>
47-
<Label>
34+
<Label>
35+
<Tooltip
36+
title={
37+
<LeftAligned>
38+
{t('The server-rendered page')}
39+
<div>
40+
<ReplayTooltipTime
41+
timestampMs={startTimestampMs + offset}
42+
startTimestampMs={startTimestampMs}
43+
/>
44+
</div>
45+
</LeftAligned>
46+
}
47+
>
4848
{t('Before')}
49-
{children}
50-
</Label>
51-
</Tooltip>
49+
</Tooltip>
50+
{children}
51+
</Label>
5252
);
5353
}
5454

5555
export function After({children, offset, startTimestampMs}: BeforeAfterProps) {
5656
return (
57-
<Tooltip
58-
title={
59-
<LeftAligned>
60-
{t('After React re-rendered the page, and reported a hydration error')}
61-
<div>
62-
<ReplayTooltipTime
63-
timestampMs={startTimestampMs + offset}
64-
startTimestampMs={startTimestampMs}
65-
/>
66-
</div>
67-
</LeftAligned>
68-
}
69-
>
70-
<Label>
57+
<Label>
58+
<Tooltip
59+
title={
60+
<LeftAligned>
61+
{t('After React re-rendered the page, and reported a hydration error')}
62+
<div>
63+
<ReplayTooltipTime
64+
timestampMs={startTimestampMs + offset}
65+
startTimestampMs={startTimestampMs}
66+
/>
67+
</div>
68+
</LeftAligned>
69+
}
70+
>
7171
{t('After')}
72-
{children}
73-
</Label>
74-
</Tooltip>
72+
</Tooltip>
73+
{children}
74+
</Label>
7575
);
7676
}
7777

0 commit comments

Comments
 (0)