pl-fe: reduce nested elements part 2
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -151,7 +151,7 @@ const ModalRoot: React.FC<IModalRoot> = ({ children, onCancel, onClose, type })
|
||||
};
|
||||
|
||||
const getSiblings = () => Array(...(ref.current!.parentElement!.childNodes as any as ChildNode[]))
|
||||
.filter(node => (node as HTMLDivElement).id !== 'toaster')
|
||||
.filter(node => (node as HTMLDivElement).id !== '_rht_toaster')
|
||||
.filter(node => node !== ref.current);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@ -60,12 +60,10 @@ const PlFeMount = () => {
|
||||
<ModalRoot />
|
||||
</Suspense>
|
||||
|
||||
<div id='toaster'>
|
||||
<Toaster
|
||||
position='top-right'
|
||||
containerClassName='top-4'
|
||||
/>
|
||||
</div>
|
||||
<Toaster
|
||||
position='top-right'
|
||||
containerClassName='top-4'
|
||||
/>
|
||||
</Route>
|
||||
</Switch>
|
||||
</ScrollContext>
|
||||
|
||||
Reference in New Issue
Block a user