Skip to content

Commit

Permalink
fix: restaured files with correction
Browse files Browse the repository at this point in the history
  • Loading branch information
LAU-MG committed Sep 2, 2024
1 parent f412525 commit 970786a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/_components/SkipLinksPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ const SkipLinksPortal: React.FC<SkipLinksPortalProps> = ({ links, elementId = 's
setIsMounted(true);
}, []);

const targetElement = document.getElementById(elementId) ?? document.body;

return isMounted ? createPortal(<SkipLinks links={links} />, targetElement) : null;
return isMounted ? createPortal(<SkipLinks links={links} />, document.getElementById(elementId) ?? document.body) : null;
};

export default SkipLinksPortal;

0 comments on commit 970786a

Please sign in to comment.