From 19c2eeba7b837927361c2020ad7c2fb0a358a41a Mon Sep 17 00:00:00 2001 From: sky121113 Date: Fri, 16 Jan 2026 15:14:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E7=A7=9F=E6=88=B6?= =?UTF-8?q?=E5=93=81=E7=89=8C=E6=A8=A3=E5=BC=8F=E6=B3=A8=E5=85=A5=E9=82=8F?= =?UTF-8?q?=E8=BC=AF=E8=88=87=E6=B8=85=E9=99=A4=E6=B7=B1=E8=89=B2=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E6=AE=98=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/Layouts/AuthenticatedLayout.tsx | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/resources/js/Layouts/AuthenticatedLayout.tsx b/resources/js/Layouts/AuthenticatedLayout.tsx index 4f23bad..b9cb3aa 100644 --- a/resources/js/Layouts/AuthenticatedLayout.tsx +++ b/resources/js/Layouts/AuthenticatedLayout.tsx @@ -34,6 +34,7 @@ import { import { usePermission } from "@/hooks/usePermission"; import ApplicationLogo from "@/Components/ApplicationLogo"; import { generateLightestColor, generateLightColor, generateDarkColor, generateActiveColor } from "@/utils/colorUtils"; +import { PageProps } from "@/types/global"; interface MenuItem { id: string; @@ -51,9 +52,9 @@ export default function AuthenticatedLayout({ children: React.ReactNode, breadcrumbs?: BreadcrumbItemType[] }) { - const { url, props } = usePage(); - // @ts-ignore - const user = props.auth?.user || { name: 'Guest', username: 'guest' }; + const { url, props } = usePage(); + const branding = props.branding; + const user = props.auth?.user || { name: 'Guest', username: 'guest', roles: [], role_labels: [], permissions: [] }; const { can, canAny } = usePermission(); const [isCollapsed, setIsCollapsed] = useState(() => { if (typeof window !== "undefined") { @@ -331,16 +332,16 @@ export default function AuthenticatedLayout({
- + {/* Mobile Header -> Global Header */}