Skip to content

Commit

Permalink
feat: remove headlessui hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Noctember committed Apr 11, 2024
1 parent e21f0f6 commit 5baccec
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ import localFont from 'next/font/local';
import clsx from 'clsx';
import ErrorBoundary from '@/components/ErrorBoundary';

// TODO: this is the stupidest solution to the worst issue ever, works for now
// https://github.com/tailwindlabs/headlessui/discussions/666#discussioncomment-1891380
if (typeof window !== 'undefined') {
const elementById = Document.prototype.getElementById;
// eslint-disable-next-line func-names
Document.prototype.getElementById = function (elementId: string) {
if (elementId === 'headlessui-portal-root') {
return document.getElementById('PortalRoot');
}
return elementById.call(this, elementId);
};
}

const StatsfmSans = localFont({
variable: '--font-statsfm-sans',
src: [
Expand Down Expand Up @@ -116,7 +103,6 @@ const App = ({
<Footer />
</ToasterContainer>
</AuthProvider>
<section id="PortalRoot" />
</main>
);
};
Expand Down

0 comments on commit 5baccec

Please sign in to comment.