Move Dots to AppWrapper

This commit is contained in:
2024-12-26 17:13:18 -06:00
parent e798b5c053
commit 4e8526f6f0

View File

@@ -1,8 +1,9 @@
import type { FunctionComponent, ReactNode } from "react";
import { Disclosure } from "@headlessui/react";
import { HiBars3, HiXMark } from "react-icons/hi2";
import { classNames } from "@/utils/helpers"; import { classNames } from "@/utils/helpers";
import { Disclosure } from "@headlessui/react";
import dynamic from "next/dynamic";
import Link from "next/link"; import Link from "next/link";
import type { FunctionComponent, ReactNode } from "react";
import { HiBars3, HiXMark } from "react-icons/hi2";
const navigation: { id: string; name: string; href: string }[] = [ const navigation: { id: string; name: string; href: string }[] = [
{ id: "home", name: "Home", href: "/" }, { id: "home", name: "Home", href: "/" },
@@ -17,6 +18,11 @@ type WrapperProps = {
children?: ReactNode | ReactNode[] | null; children?: ReactNode | ReactNode[] | null;
}; };
const DotsDynamic = dynamic(
() => import('@/components/Dots'),
{ ssr: false }
)
const AppWrapper: FunctionComponent<WrapperProps> = ({ const AppWrapper: FunctionComponent<WrapperProps> = ({
current, current,
children, children,
@@ -97,6 +103,7 @@ const AppWrapper: FunctionComponent<WrapperProps> = ({
)} )}
</Disclosure> </Disclosure>
) : null} ) : null}
<DotsDynamic />
{children} {children}
</main> </main>
); );