Resolve bug with toast during modal
This commit is contained in:
parent
f23538c46a
commit
5f3250b175
|
@ -181,7 +181,9 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSiblings = () => {
|
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(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -191,7 +191,14 @@ const SoapboxMount = () => {
|
||||||
</BundleContainer>
|
</BundleContainer>
|
||||||
|
|
||||||
<GdprBanner />
|
<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>
|
</Route>
|
||||||
</Switch>
|
</Switch>
|
||||||
</ScrollContext>
|
</ScrollContext>
|
||||||
|
|
Loading…
Reference in New Issue