Skip to content

Commit 8b40718

Browse files
committed
improvement: better admin item menu
1 parent 0197929 commit 8b40718

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

resources/js/composables/useAppLayout.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,10 @@ export function useAppLayout() {
6060
},
6161
],
6262
},
63-
];
64-
65-
if (page.props.auth.isAdmin) {
66-
items.push({
63+
{
6764
label: 'Admin',
6865
lucideIcon: Lock,
66+
visible: page.props.auth.isAdmin,
6967
items: [
7068
{
7169
label: 'Dashboard',
@@ -80,8 +78,8 @@ export function useAppLayout() {
8078
active: currentRoute.value == 'admin.users.index',
8179
},
8280
],
83-
});
84-
}
81+
},
82+
];
8583

8684
return items;
8785
});

0 commit comments

Comments
 (0)