Merge branch 'fix-z-index' into 'develop'

Resolve bug with toast during modal

See merge request soapbox-pub/soapbox!2436
environments/review-develop-3zknud/deployments/3165
Chewbacca 2023-04-13 11:21:43 +00:00
commit 5bcd150c4b
2 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -181,7 +181,9 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
};
const getSiblings = () => {
return Array(...(ref.current!.parentElement!.childNodes as any as ChildNode[])).filter(node => node !== ref.current);
return Array(...(ref.current!.parentElement!.childNodes as any as ChildNode[]))
.filter(node => (node as HTMLDivElement).id !== 'toaster')
.filter(node => node !== ref.current);
};
useEffect(() => {

Wyświetl plik

@ -191,7 +191,14 @@ const SoapboxMount = () => {
</BundleContainer>
<GdprBanner />
<Toaster position='top-right' containerClassName='top-10' containerStyle={{ top: 75 }} />
<div id='toaster'>
<Toaster
position='top-right'
containerClassName='top-10'
containerStyle={{ top: 75 }}
/>
</div>
</Route>
</Switch>
</ScrollContext>