<script setup lang="ts">
import { useRoute, useRouter } from 'vue-router';
import { useItem } from '../stores/item';
import { watch } from 'vue';

const page = useItem()
const route = useRoute()
const router = useRouter()

router.afterEach((to) => {
    if (to.name == 'home_no') {
        page.load(route.params)
    }
    return true
})

watch(() => route.params.item, () => {
    page.load(route.params)
})
</script>
<template>

</template>