<script setup>
import { useUserStore } from '@/stores/user'
import HomePage from '@/components/HomePage.vue'
import LandingPage from '@/components/LandingPage.vue'
const userStore = useUserStore()
const { isAuthenticated } = storeToRefs(userStore)
definePageMeta({
layout: isAuthenticated.value ? 'default' : 'unauthenticated'
})
</script>
<template>
<div>
<!-- Conditionally render the components based on authentication state -->
<component :is="isAuthenticated ? HomePage : LandingPage" />
</div>
</template>
<script setup>
import { useUserStore } from '@/stores/user'
import HomePage from '@/components/HomePage.vue'
import LandingPage from '@/components/LandingPage.vue'
const userStore = useUserStore()
const { isAuthenticated } = storeToRefs(userStore)
definePageMeta({
layout: isAuthenticated.value ? 'default' : 'unauthenticated'
})
</script>
<template>
<div>
<!-- Conditionally render the components based on authentication state -->
<component :is="isAuthenticated ? HomePage : LandingPage" />
</div>
</template>