nidus-sync/ts/AppSync.vue
Eli Ribble f88ca57d97
Migrate existing ts types from the API into the API module
This makes it possible to start hydrating the types into valid data
types like Dates which means I can get type safety guarantees when
displaying information.
2026-04-09 00:25:21 +00:00

34 lines
850 B
Vue

<template>
<div class="app-container">
<Sidebar v-if="$route.meta.showSidebar" />
<MainContent>
<div v-if="session.loading">Loading...</div>
<div v-else-if="session.error">Error: {{ session.error }}</div>
<router-view v-else />
</MainContent>
</div>
</template>
<script setup lang="ts">
import { onMounted } from "vue";
import { useSessionStore } from "@/store/session";
import { Session } from "@/type/api";
import Sidebar from "./components/layout/Sidebar.vue";
import MainContent from "./components/layout/MainContent.vue";
import NavigationLink from "@/components/common/NavigationLink.vue";
const session = useSessionStore();
onMounted(() => {
session.get().then((session: Session) => {
console.log("session loaded", session);
});
});
</script>
<style scoped>
.app-container {
display: flex;
height: 100vh;
}
</style>