2022-11-13 06:34:43 +01:00
|
|
|
<script setup lang="ts">
|
2022-11-14 15:54:30 +01:00
|
|
|
const token = useCookie('nuxtodon-token')
|
|
|
|
const router = useRouter()
|
2022-11-15 14:50:41 +01:00
|
|
|
|
2022-11-15 12:54:07 +01:00
|
|
|
// TODO: move to middleware
|
2022-11-14 15:54:30 +01:00
|
|
|
if (!token.value)
|
|
|
|
router.replace('/public')
|
2022-11-15 14:50:41 +01:00
|
|
|
else
|
|
|
|
router.replace('/home')
|
2022-11-13 06:34:43 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-15 14:50:41 +01:00
|
|
|
<div />
|
2022-11-13 06:34:43 +01:00
|
|
|
</template>
|