Skip to content

Commit 918fc35

Browse files
committed
fix: showing the chanelog popup above the ad
1 parent e46bd87 commit 918fc35

2 files changed

Lines changed: 27 additions & 22 deletions

File tree

src/features/adv/components/AdvBanner.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
align-items: center;
1111
justify-content: center;
1212
max-width: 330px;
13-
z-index: 1;
13+
z-index: 0;
1414
margin: 0 auto;
1515
}
1616
.banneradv a {
@@ -122,7 +122,7 @@
122122
aspect-ratio: 1;
123123
height: fit-content;
124124
width: 45%;
125-
z-index: 2;
125+
z-index: 1;
126126
object-fit: cover;
127127
border-radius: 10px;
128128
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

src/features/changelog/components/Changelog.tsx

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect, useMemo, useState } from 'react'
2+
import { createPortal } from 'react-dom'
23
import { HiSparkles } from 'react-icons/hi'
34
import ReactMarkdown from 'react-markdown'
45
import BeatLoader from 'react-spinners/BeatLoader'
@@ -67,26 +68,30 @@ export const Changelog = () => {
6768
}, [versions])
6869
return (
6970
<>
70-
<ReactTooltip
71-
id={tooltipId}
72-
event="click"
73-
scrollHide={false}
74-
afterShow={() => {
75-
setTooltipShown(true)
76-
}}
77-
place="bottom"
78-
className="changelogTooltip scrollable"
79-
globalEventOff="click">
80-
{isLoading ? (
81-
<div className="tooltipLoading">
82-
<BeatLoader color={'#A9B2BD'} loading={isLoading} size={15} />
83-
</div>
84-
) : isError || !versions.length ? (
85-
<p className="tooltipErrorMsg">Failed to load the changelog</p>
86-
) : (
87-
versionsMemo
88-
)}
89-
</ReactTooltip>
71+
{createPortal(
72+
<ReactTooltip
73+
id={tooltipId}
74+
event="click"
75+
scrollHide={false}
76+
afterShow={() => {
77+
setTooltipShown(true)
78+
}}
79+
place="bottom"
80+
className="changelogTooltip scrollable"
81+
globalEventOff="click">
82+
{isLoading ? (
83+
<div className="tooltipLoading">
84+
<BeatLoader color={'#A9B2BD'} loading={isLoading} size={15} />
85+
</div>
86+
) : isError || !versions.length ? (
87+
<p className="tooltipErrorMsg">Failed to load the changelog</p>
88+
) : (
89+
versionsMemo
90+
)}
91+
</ReactTooltip>,
92+
document.body
93+
)}
94+
9095
<button
9196
aria-label="Open changelog"
9297
className={'changelogButton' + (!isChangelogRead() ? ' active' : '')}

0 commit comments

Comments
 (0)