From 515eec239356186b8c244a9426e70c24313ebb38 Mon Sep 17 00:00:00 2001
From: Thanakarn Klangkasame <77600906+Simulationable@users.noreply.github.com>
Date: Thu, 9 Oct 2025 11:03:59 +0700
Subject: [PATCH] Fix Layout
---
src/app/component/layout/AppShell.tsx | 43 ++++++++++--------------
src/app/layout.tsx | 48 ++++++++++++---------------
2 files changed, 40 insertions(+), 51 deletions(-)
diff --git a/src/app/component/layout/AppShell.tsx b/src/app/component/layout/AppShell.tsx
index b2d9906..0cb253a 100644
--- a/src/app/component/layout/AppShell.tsx
+++ b/src/app/component/layout/AppShell.tsx
@@ -1,15 +1,14 @@
-// File: src/app/component/layout/AppShell.tsx
"use client";
-import {ReactNode, useMemo, useState} from "react";
+import { ReactNode, useMemo, useState } from "react";
import Link from "next/link";
-import {usePathname} from "next/navigation";
-import type {UserSession} from "@/types/auth";
+import { usePathname } from "next/navigation";
+import type { UserSession } from "@/types/auth";
type NavItem = { label: string; href: string; icon?: React.ReactNode; match?: RegExp };
type Props = { user: UserSession; nav: NavItem[]; children: ReactNode };
-export default function AppShell({user, nav, children}: Props) {
+export default function AppShell({ user, nav, children }: Props) {
const [sidebarOpen, setSidebarOpen] = useState(true);
const pathname = usePathname();
@@ -24,11 +23,11 @@ export default function AppShell({user, nav, children}: Props) {
Boolean((item.match && item.match.test(pathname)) || pathname === item.href);
return (
-
+
{/* Sidebar (desktop) */}