enhance (auth): clear store on 401 and redirect to /401

This commit is contained in:
Abizrh
2025-08-13 13:17:21 +07:00
parent d5c453450f
commit d8d7d61fca
3 changed files with 13 additions and 2 deletions
-1
View File
@@ -6,7 +6,6 @@ import { Calendar, Hospital, UserCheck, UsersRound } from 'lucide-vue-next'
const data = ref([])
const refSearchNav: RefSearchNav = {
onClick: () => {
// open filter modal
},
+2 -1
View File
@@ -43,7 +43,8 @@ const router = useRouter()
</template>
<div class="mt-6 flex gap-4">
<Button variant="outline" @click="router.back()"> Kembali </Button>
<Button @click="router.push('/')"> Kembali Ke Dashboard </Button>
<Button v-if="statusCode === 401" @click="router.push('/auth/login')">Login</Button>
<Button v-else @click="router.push('/')">Kembali ke Dashboard</Button>
</div>
</div>
</div>