@@ -16,11 +16,6 @@ const currentRoute = computed(() => {
1616 return route ().current ();
1717});
1818
19- const logoutForm = useForm ({});
20- function logout () {
21- logoutForm .post (route (' logout' ));
22- }
23-
2419// Main menu
2520const mainMenuItems = computed (() => [
2621 {
@@ -32,6 +27,7 @@ const mainMenuItems = computed(() => [
3227
3328// User menu (desktop)
3429const userMenu = useTemplateRef (' user-menu' );
30+ const logoutForm = useForm ({});
3531const userMenuItems = [
3632 {
3733 label: ' Profile' ,
@@ -42,7 +38,7 @@ const userMenuItems = [
4238 label: ' Log Out' ,
4339 icon: ' pi pi-fw pi-sign-out' ,
4440 command : () => {
45- logout ( );
41+ logoutForm . post ( route ( ' logout ' ) );
4642 },
4743 },
4844];
@@ -111,19 +107,19 @@ if (import.meta.env.SSR === false) {
111107 < div>
112108 < ToggleDarkModeButton
113109 severity= " secondary"
114- text
115110 rounded
111+ text
116112 / >
117113 < / div>
118114 <!-- User Dropdown Menu -->
119115 < div class = " flex flex-col" >
120116 < Button
121117 id= " user-menu-btn"
122- text
123118 severity= " secondary"
124119 : label= " page.props.auth.user.name"
125120 icon= " pi pi-angle-down"
126121 iconPos= " right"
122+ text
127123 @click= " toggleUserMenu($event)"
128124 / >
129125 < div
@@ -144,10 +140,10 @@ if (import.meta.env.SSR === false) {
144140 < div class = " flex items-center lg:hidden" >
145141 < div class = " relative" >
146142 < Button
147- text
148143 severity= " secondary"
149144 icon= " pi pi-bars"
150145 pt: icon: class = " text-xl"
146+ text
151147 @click= " mobileMenuOpen = true"
152148 / >
153149 < / div>
@@ -164,8 +160,8 @@ if (import.meta.env.SSR === false) {
164160 < template #header>
165161 < ToggleDarkModeButton
166162 severity= " secondary"
167- text
168163 rounded
164+ text
169165 / >
170166 < / template>
171167 < div>
@@ -190,9 +186,9 @@ if (import.meta.env.SSR === false) {
190186 < Button
191187 label= " Profile"
192188 icon= " pi pi-user"
193- fluid
194189 severity= " secondary"
195190 outlined
191+ fluid
196192 >< / Button>
197193 < / InertiaLink>
198194 < Button
0 commit comments