From 47151643487329904358a86255fb47098b6368d6 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Wed, 14 Jun 2023 21:22:46 +0700 Subject: [PATCH] Update SidebarNav.jsx --- resources/js/Layouts/Partials/SidebarNav.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/js/Layouts/Partials/SidebarNav.jsx b/resources/js/Layouts/Partials/SidebarNav.jsx index bff94df..2035c5e 100644 --- a/resources/js/Layouts/Partials/SidebarNav.jsx +++ b/resources/js/Layouts/Partials/SidebarNav.jsx @@ -1,12 +1,15 @@ import React from 'react' -import { router } from '@inertiajs/react' +import { router, usePage } from '@inertiajs/react' import { Sidebar } from 'flowbite-react' import { HiLogout } from 'react-icons/hi' import { filterOpenMenu } from './helpers' import routes from './routes' -import { formatDate } from '@/utils' export default function SidebarNav({ user }) { + const { + props: { app_name }, + } = usePage() + const menus = routes.filter((item) => { item.open = false if (!item.show) { @@ -68,7 +71,7 @@ export default function SidebarNav({ user }) {

- App Name © {new Date().getFullYear()} + {app_name} © {new Date().getFullYear()}