빌드 에러 수정

This commit is contained in:
kjs 2025-09-05 14:00:45 +09:00
parent 53a44b901d
commit d89fd2d38d
1 changed files with 19 additions and 2 deletions

View File

@ -1,6 +1,6 @@
"use client";
import { useState } from "react";
import { useState, Suspense } from "react";
import { useRouter, usePathname, useSearchParams } from "next/navigation";
import { Button } from "@/components/ui/button";
import {
@ -191,7 +191,7 @@ const convertSingleMenu = (menu: MenuItem, allMenus: MenuItem[], userInfo: Exten
};
};
export function AppLayout({ children }: AppLayoutProps) {
function AppLayoutInner({ children }: AppLayoutProps) {
const router = useRouter();
const pathname = usePathname();
const searchParams = useSearchParams();
@ -442,3 +442,20 @@ export function AppLayout({ children }: AppLayoutProps) {
</div>
);
}
export function AppLayout({ children }: AppLayoutProps) {
return (
<Suspense
fallback={
<div className="flex h-screen items-center justify-center">
<div className="flex flex-col items-center">
<div className="mb-4 h-8 w-8 animate-spin rounded-full border-4 border-blue-500 border-t-transparent"></div>
<p>...</p>
</div>
</div>
}
>
<AppLayoutInner>{children}</AppLayoutInner>
</Suspense>
);
}