nidus-sync/ts/view/Home.vue

24 lines
561 B
Vue
Raw Permalink Normal View History

<template>
<p>loading home...</p>
</template>
<script setup lang="ts">
import { onMounted } from "vue";
import { useSessionStore } from "@/store/session";
import { Session } from "@/type/api";
import { router } from "@/route/config";
const session = useSessionStore();
onMounted(() => {
session
.get()
.then((session: Session) => {
console.log("hit home with a valid session, going to dash");
router.push("/_/dash");
})
.catch((e) => {
console.log("hit home with no session, going to signin");
2026-04-16 17:30:54 +00:00
router.push("/signin");
});
2026-04-14 19:05:10 +00:00
});
</script>