260904_01_BUG: next config가 수정되면서 생긴 오류 수정

This commit is contained in:
2026-09-04 13:45:01 +09:00
parent b3091f8a02
commit e78994700d
3 changed files with 16 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
"use client";
import { useMemo, useState } from "react";
import type { Route } from "next";
import { useMemo, useState, type ReactNode } from "react";
import { usePathname, useRouter } from "next/navigation";
import { KriMainLayout } from "@/components/layout/KriMainLayout";
import { AppHeader } from "./AppHeader";
@@ -8,7 +9,7 @@ import { AppSidebar } from "./AppSidebar";
import { sideMenus, topMenus } from "@/config/menu.data";
import { useAuth } from "@/hooks/useAuth";
export function AppMainLayout({ children }: { children: React.ReactNode }) {
export function AppMainLayout({ children }: { children: ReactNode }) {
const pathname = usePathname();
const router = useRouter();
const { auth } = useAuth();
@@ -19,7 +20,7 @@ export function AppMainLayout({ children }: { children: React.ReactNode }) {
[pathname],
);
const navigate = (path: string) => router.push(path);
const navigate = (path: string) => router.push(path as Route);
const hasSidebar = sideMenus.length > 0;
return (