From 806b173d221af1a8a6de3013f5ed1ed3f364abd1 Mon Sep 17 00:00:00 2001 From: Max Leiter Date: Sat, 25 Feb 2023 22:46:55 -0800 Subject: [PATCH] Make CmdK dynamic --- src/app/(drift)/layout.tsx | 3 +-- src/app/components/cmdk/index.tsx | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/(drift)/layout.tsx b/src/app/(drift)/layout.tsx index c2cec48c..afa093c8 100644 --- a/src/app/(drift)/layout.tsx +++ b/src/app/(drift)/layout.tsx @@ -9,8 +9,7 @@ import dynamic from "next/dynamic" const inter = Inter({ subsets: ["latin"], variable: "--inter-font" }) -// const CmdK = dynamic(() => import("@components/cmdk"), { ssr: false }) -import CmdK from "@components/cmdk" +const CmdK = dynamic(() => import("@components/cmdk"), { ssr: false }) export default async function RootLayout({ children diff --git a/src/app/components/cmdk/index.tsx b/src/app/components/cmdk/index.tsx index cbfe6989..d3aa1d22 100644 --- a/src/app/components/cmdk/index.tsx +++ b/src/app/components/cmdk/index.tsx @@ -1,6 +1,5 @@ "use client" -import FadeIn from "@components/fade-in" import { Command } from "cmdk" import { useEffect, useRef, useState } from "react" import styles from "./cmdk.module.css"