260904_01_BUG: next config가 수정되면서 생긴 오류 수정
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user