import { createRouter, createWebHistory } from 'vue-router' const router = createRouter({ history: createWebHistory('/psy/'), routes: [ { path: '/', name: 'home', component: () => import('../pages/HomePage.vue') }, { path: '/explore', name: 'explore', component: () => import('../pages/ExplorePage.vue') }, { path: '/explore/:category', name: 'explore-category', component: () => import('../pages/ExploreCategoryPage.vue'), }, { path: '/growth-plan', name: 'growth-plan', component: () => import('../pages/GrowthPlanPage.vue'), }, { path: '/ask', name: 'ask', component: () => import('../pages/AskPage.vue') }, { path: '/companion', name: 'companion', component: () => import('../pages/CompanionPage.vue') }, { path: '/mine', name: 'mine', component: () => import('../pages/MinePage.vue') }, { path: '/login', name: 'login', component: () => import('../pages/LoginPage.vue') }, { path: '/profile', name: 'profile', component: () => import('../pages/ProfilePage.vue') }, { path: '/portrait', name: 'portrait', component: () => import('../pages/PortraitPage.vue') }, { path: '/star', name: 'star', component: () => import('../pages/StarProfilePage.vue') }, { path: '/synastry', name: 'synastry', component: () => import('../pages/SynastryPage.vue') }, { path: '/synastry/invite/:token', name: 'synastry-invite', component: () => import('../pages/SynastryInvitePage.vue'), }, { path: '/rhythm', name: 'rhythm', component: () => import('../pages/LifeRhythmPage.vue') }, { path: '/cards', name: 'cards', component: () => import('../pages/ImageCardPage.vue') }, { path: '/relation', name: 'relation', component: () => import('../pages/RelationPage.vue') }, { path: '/membership', name: 'membership', component: () => import('../pages/MembershipPage.vue') }, { path: '/scales/:slug', name: 'scale', component: () => import('../pages/ScalePage.vue') }, { path: '/share', name: 'share', component: () => import('../pages/SharePage.vue') }, { path: '/reports', name: 'reports', component: () => import('../pages/ReportsPage.vue') }, { path: '/reports/:id', name: 'report', component: () => import('../pages/ReportPage.vue') }, { path: '/decode', redirect: (to) => ({ path: '/portrait', query: to.query }) }, ], scrollBehavior() { return { top: 0 } }, }) export default router