Update
This commit is contained in:
@@ -2,11 +2,10 @@ import { NavFooter } from '@/components/nav-footer';
|
||||
import { NavMain } from '@/components/nav-main';
|
||||
import { NavUser } from '@/components/nav-user';
|
||||
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
|
||||
import { type NavItem } from '@/types';
|
||||
import { SharedData, type NavItem } from '@/types';
|
||||
import { Link, usePage } from '@inertiajs/react';
|
||||
import { LayoutGrid, UserCog } from 'lucide-react';
|
||||
import { LayoutGrid, UserCog } from 'lucide-react';
|
||||
import AppLogo from './app-logo';
|
||||
import { SharedData } from '@/types';
|
||||
|
||||
const mainNavItems: NavItem[] = [
|
||||
{
|
||||
@@ -22,6 +21,11 @@ const adminMainNavItems: NavItem[] = [
|
||||
href: route('admin.dashboard'),
|
||||
icon: UserCog,
|
||||
},
|
||||
{
|
||||
title: 'Background Generation',
|
||||
href: route('admin.background-generation'),
|
||||
icon: UserCog,
|
||||
},
|
||||
];
|
||||
|
||||
const footerNavItems: NavItem[] = [
|
||||
@@ -38,7 +42,6 @@ const footerNavItems: NavItem[] = [
|
||||
];
|
||||
|
||||
export function AppSidebar() {
|
||||
|
||||
const { auth } = usePage<SharedData>().props;
|
||||
|
||||
return (
|
||||
@@ -60,8 +63,6 @@ export function AppSidebar() {
|
||||
{auth?.user_is_admin && <NavMain title="Admin" items={adminMainNavItems} />}
|
||||
</SidebarContent>
|
||||
|
||||
|
||||
|
||||
<SidebarFooter>
|
||||
<NavFooter items={footerNavItems} className="mt-auto" />
|
||||
<NavUser />
|
||||
|
||||
Reference in New Issue
Block a user