File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 1
- <script setup></script >
1
+ <script setup>
2
+ definePageMeta ({
3
+ middleware : function (to , from ) {
4
+ const isAuthenticated = useCookie (' is-authenticated' )
5
+ const currentUser = useCookie (' current-user' )
6
+
7
+ if (isAuthenticated .value && currentUser .value ) {
8
+ return navigateTo (' /profile/' + currentUser .value )
9
+ }
10
+ }
11
+ })
12
+ </script >
2
13
3
14
<template >
4
15
<article class =" grid" >
Original file line number Diff line number Diff line change 1
- <script setup></script >
1
+ <script setup>
2
+ definePageMeta ({
3
+ middleware : function (to , from ) {
4
+ const isAuthenticated = useCookie (' is-authenticated' )
5
+ const currentUser = useCookie (' current-user' )
6
+
7
+ isAuthenticated .value = ' '
8
+ currentUser .value = ' '
9
+
10
+ return navigateTo (' /' )
11
+ }
12
+ })
13
+ </script >
2
14
3
15
<template >
4
16
<article class =" grid" >
You can’t perform that action at this time.
0 commit comments