fix: add page Product list and fix page Cart

This commit is contained in:
2026-03-19 15:46:18 +01:00
parent 1ea50af96a
commit 99fe11fbeb
17 changed files with 168 additions and 97 deletions

View File

@@ -9,11 +9,7 @@ function isAuthenticated(): boolean {
if (typeof document === 'undefined') return false
return document.cookie.split('; ').some((c) => c === 'is_authenticated=1')
}
await getSettings()
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_BASE_URL),
routes: [
@@ -34,6 +30,7 @@ const router = createRouter({
{ path: 'product-card-full/', component: () => import('../components/customer/PageProductCardFull.vue'), name: 'product-card-full' },
{ path: 'addresses', component: () => import('../components/customer/PageAddresses.vue'), name: 'addresses' },
{ path: 'cart', component: () => import('../components/customer/PageCart.vue'), name: 'cart' },
{ path: 'products-list', component: () => import('../components/customer/PageProductsList.vue'), name: 'products-list' },
],
},
{
@@ -55,7 +52,6 @@ const router = createRouter({
router.beforeEach((to, from, next) => {
const locale = to.params.locale as string
const localeLang = langs.find((x) => x.iso_code == locale)
if (locale && langs.length > 0) {
const authStore = useAuthStore()
console.log(authStore.isAuthenticated, to, from)
@@ -77,7 +73,6 @@ router.beforeEach((to, from, next) => {
if (!locale && to.path !== '/') {
return next(`/${currentLang.value?.iso_code}${to.path}`)
}
next()
})