From 5baccec3250ba77c25e4656d2c39ea3ed892f48a Mon Sep 17 00:00:00 2001 From: Xavier B Date: Thu, 11 Apr 2024 02:59:04 -0400 Subject: [PATCH] feat: remove headlessui hack --- src/pages/_app.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index e94e1c84..653d6052 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -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: [ @@ -116,7 +103,6 @@ const App = ({