diff --git a/components/shared/navbar/navbar-menu.tsx b/components/shared/navbar/navbar-menu.tsx
index eafe551..925b664 100644
--- a/components/shared/navbar/navbar-menu.tsx
+++ b/components/shared/navbar/navbar-menu.tsx
@@ -1,5 +1,6 @@
'use client'
+import {useLocale} from 'next-intl'
import {useState} from 'react'
import {Link} from '@/i18n/routing'
@@ -8,7 +9,7 @@ import {Button} from '@/ui/button'
export default function NavbarMenu() {
const bp = 'md'
-
+ const locale = useLocale()
const [menuOpened, setMenuOpened] = useState(false)
function ToggleNavbar() {
@@ -19,11 +20,13 @@ export default function NavbarMenu() {
<>
- {data.headerMenus.map(item => (
-
- {item.name}
-
- ))}
+ {data[locale === 'uk' ? 'headerMenus' : 'headerMenusRus'].map(
+ item => (
+
+ {item.name}
+
+ )
+ )}
{/*
diff --git a/data/products.ts b/data/products.ts
index adf4ff7..b5ee94c 100644
--- a/data/products.ts
+++ b/data/products.ts
@@ -1,9 +1,42 @@
export default [
{
- id: 0,
- qnt: '14',
- form: 'порошок',
- vendor: 'Fine Foods & Pharmaceuticals N.T.M. SpA',
+ id: 6,
+ title: '30 капсул у блістері',
+ qnt: '30',
+ form: 'капсули',
+ vendor: 'ТОВ «АКТІЛАЙФ НУТРІШН»',
+ country: 'Україна'
+ },
+ {
+ id: 7,
+ title: '20 питних ампул',
+ qnt: '20',
+ form: 'ампули',
+ vendor: 'Фармлабор-Продутос Фармасеутікос С.А.',
+ country: 'Португалія'
+ },
+ {
+ id: 8,
+ title: '30 таблеток «ДЕНЬ» та 30 таблеток «НІЧ»',
+ qnt: '60',
+ form: 'таблетки',
+ vendor: 'Ерба Віта Груп С.п.А.',
country: 'Італія'
+ },
+ {
+ id: 10,
+ title: '60 таблеток у блicтерi',
+ qnt: '60',
+ form: 'таблетки',
+ vendor: 'ТОВ «АКТІЛАЙФ НУТРІШН»',
+ country: 'Україна'
+ },
+ {
+ id: 11,
+ title: '10 саше у картонній коробці',
+ qnt: '10',
+ form: 'порошок',
+ vendor: 'ТОВ «Еубіон Корпорейшн»',
+ country: 'Польща'
}
]
diff --git a/lib/data.ts b/lib/data.ts
index e66e366..306f2f9 100644
--- a/lib/data.ts
+++ b/lib/data.ts
@@ -1,98 +1,51 @@
-import {slug} from '@/lib/utils'
-
export const data = {
headerMenus: [
{
name: 'Про нас',
- slug: slug('Про нас'),
href: '/about-us'
},
{
name: "Цікаво про здоров'я",
- slug: slug("Цікаво про здоров'я"),
href: '/search?tag='
},
{
name: 'Програма лояльності',
- slug: slug('Програма лояльності'),
href: '/search?tag='
},
{
name: 'Доставка і повернення',
- slug: slug('Доставка і повернення'),
href: '/search?tag='
},
{
name: 'Контакти',
- slug: slug('Контакти'),
+ href: '/search?tag='
+ }
+ ],
+
+ headerMenusRus: [
+ {
+ name: 'О нас',
+ href: '/about-us'
+ },
+ {
+ name: 'Интересно о здоровье',
+ href: '/search?tag='
+ },
+ {
+ name: 'Программа лояльности',
+ href: '/search?tag='
+ },
+ {
+ name: 'Доставка и возврат',
+ href: '/search?tag='
+ },
+ {
+ name: 'Контакты',
href: '/search?tag='
}
]
}
-export const categories = [
- {
- name: "Жіноче здоров'я",
- rus: 'Женское здоровье',
- slug: slug("Жіноче здоров'я")
- },
- {
- name: "Чоловіче здоров'я",
- rus: 'Мужское здоровье',
- slug: slug("Чоловіче здоров'я")
- },
- {
- name: 'Краса (шкіра, волосся, нігті)',
- rus: 'Красота (кожа, волосы, ногти)',
- slug: slug('Краса (шкіра, волосся, нігті)')
- },
- {
- name: 'Здоровий сон',
- rus: 'Здоровый сон',
- slug: slug('Здоровий сон')
- },
- {
- name: 'Імунітет',
- rus: 'Иммунитет',
- slug: slug('Імунітет')
- },
- {
- name: 'Для кісток та суглобів',
- rus: 'Для костей и суставов',
- slug: slug('Для кісток та суглобів')
- },
- {
- name: 'Для зниження цукру в крові',
- rus: 'Для снижения уровня сахара в крови',
- slug: slug('Для зниження цукру в крові')
- },
- {
- name: 'Детоксикація',
- rus: 'Детоксикация',
- slug: slug('Детоксикація')
- },
- {
- name: "Здоров'я печінки",
- rus: 'Здоровье печени',
- slug: slug("Здоров'я печінки")
- },
- {
- name: 'Для щитовидної залози',
- rus: 'Для щитовидной железы',
- slug: slug('Для щитовидної залози')
- },
- {
- name: 'Життєвий тонус',
- rus: 'Жизненный тонус',
- slug: slug('Життєвий тонус')
- },
- {
- name: 'Антистрес',
- rus: 'Антистресс',
- slug: slug('Антистрес')
- }
-]
-
export const carousels = [
{
title: 'The Children of the Serpent',
@@ -116,37 +69,3 @@ export const carousels = [
isPublished: true
}
]
-
-export const cards = [
- {
- title: 'Пінеал Тенс',
- image: '/uploads/637393-1500x1500-ea2f.jpg',
- href: slug('Пінеал Тенс'),
- price: 720
- },
- {
- title: 'Вістакеа Остеостронг',
- image: '/uploads/1256-vistacare_osteostrong_tablets_box_livo_1.png',
- href: slug('Вістакеа Остеостронг'),
- price: 640
- },
- {
- title: 'Вістакеа Детокс',
- image:
- '/uploads/1ca3d021-a55d-4c0a-aa7b-06ecb5f905b0-w1000-h1000-wm-frame.jpg',
- href: slug('Вістакеа Детокс'),
- price: 850
- },
- {
- title: 'Тіромодал',
- image: '/uploads/189238-192172-orig-1500-1500-d76a.jpg',
- href: slug('Тіромодал'),
- price: 535
- },
- {
- title: 'Артросульфур С',
- image: '/uploads/79282077-e324-4248-9f5d-184242ec4dd4.webp',
- href: slug('Артросульфур С'),
- price: 535
- }
-]
diff --git a/messages/ru.json b/messages/ru.json
index ae4b534..e28b371 100644
--- a/messages/ru.json
+++ b/messages/ru.json
@@ -5,7 +5,8 @@
},
"Common": {
"home": "Главная",
- "price": "Цена"
+ "price": "Цена",
+ "buy": "Купить"
},
"Error": {
"title": "Произошла ошибка",
@@ -33,7 +34,11 @@
"favorites": "Избранное",
"empty": "Корзина пуста",
"continue": "Продолжить покупки",
- "checkout": "Оформить заказ"
+ "checkout": "Оформить заказ",
+ "title": "Название",
+ "quantity": "Количество",
+ "amount": "Стоимость",
+ "total": "Всего"
},
"cabinet": {
"personal-information": {
diff --git a/package-lock.json b/package-lock.json
index 426107c..04e56f1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,7 +16,7 @@
"@radix-ui/react-dialog": "^1.1.5",
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-label": "^2.1.1",
- "@radix-ui/react-select": "^2.1.4",
+ "@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-switch": "^1.1.2",
@@ -2239,32 +2239,253 @@
}
},
"node_modules/@radix-ui/react-select": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.5.tgz",
- "integrity": "sha512-eVV7N8jBXAXnyrc+PsOF89O9AfVgGnbLxUtBb0clJ8y8ENMWLARGMI/1/SBRLz7u4HqxLgN71BJ17eono3wcjA==",
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.1.6.tgz",
+ "integrity": "sha512-T6ajELxRvTuAMWH0YmRJ1qez+x4/7Nq7QIx7zJ0VK3qaEWdnWpNbEDnmWldG1zBDwqrLy5aLMUWcoGirVj5kMg==",
"license": "MIT",
"dependencies": {
"@radix-ui/number": "1.1.0",
"@radix-ui/primitive": "1.1.1",
- "@radix-ui/react-collection": "1.1.1",
+ "@radix-ui/react-collection": "1.1.2",
"@radix-ui/react-compose-refs": "1.1.1",
"@radix-ui/react-context": "1.1.1",
"@radix-ui/react-direction": "1.1.0",
- "@radix-ui/react-dismissable-layer": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.5",
"@radix-ui/react-focus-guards": "1.1.1",
- "@radix-ui/react-focus-scope": "1.1.1",
+ "@radix-ui/react-focus-scope": "1.1.2",
"@radix-ui/react-id": "1.1.0",
- "@radix-ui/react-popper": "1.2.1",
- "@radix-ui/react-portal": "1.1.3",
- "@radix-ui/react-primitive": "2.0.1",
- "@radix-ui/react-slot": "1.1.1",
+ "@radix-ui/react-popper": "1.2.2",
+ "@radix-ui/react-portal": "1.1.4",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-slot": "1.1.2",
"@radix-ui/react-use-callback-ref": "1.1.0",
"@radix-ui/react-use-controllable-state": "1.1.0",
"@radix-ui/react-use-layout-effect": "1.1.0",
"@radix-ui/react-use-previous": "1.1.0",
- "@radix-ui/react-visually-hidden": "1.1.1",
+ "@radix-ui/react-visually-hidden": "1.1.2",
"aria-hidden": "^1.2.4",
- "react-remove-scroll": "^2.6.2"
+ "react-remove-scroll": "^2.6.3"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.2.tgz",
+ "integrity": "sha512-G+KcpzXHq24iH0uGG/pF8LyzpFJYGD4RfLjCIBfGdSLXvjLHST31RUiRVrupIBMvIppMgSzQ6l66iAxl03tdlg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-collection": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.2.tgz",
+ "integrity": "sha512-9z54IEKRxIa9VityapoEYMuByaG42iSy1ZXlY2KcuLSEtq8x4987/N6m15ppoMffgZX72gER2uHe1D9Y6Unlcw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.1",
+ "@radix-ui/react-context": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-slot": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.5.tgz",
+ "integrity": "sha512-E4TywXY6UsXNRhFrECa5HAvE5/4BFcGyfTyK36gP+pAW1ed7UTK4vKwdr53gAJYwqbfCWC6ATvJa3J3R/9+Qrg==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.1",
+ "@radix-ui/react-compose-refs": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-escape-keydown": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.2.tgz",
+ "integrity": "sha512-zxwE80FCU7lcXUGWkdt6XpTTCKPitG1XKOwViTxHVKIJhZl9MvIl2dVHeZENCWD9+EdWv05wlaEkRXUykU27RA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.2.tgz",
+ "integrity": "sha512-Rvqc3nOpwseCyj/rgjlJDYAgyfw7OC1tTkKn2ivhaMGcYt8FSBlahHOZak2i3QwkRXUXgGgzeEe2RuqeEHuHgA==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.2",
+ "@radix-ui/react-compose-refs": "1.1.1",
+ "@radix-ui/react-context": "1.1.1",
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.0",
+ "@radix-ui/react-use-rect": "1.1.0",
+ "@radix-ui/react-use-size": "1.1.0",
+ "@radix-ui/rect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-portal": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.4.tgz",
+ "integrity": "sha512-sn2O9k1rPFYVyKd5LAJfo96JlSGVFpa1fS6UuBJfrZadudiw5tAmru+n1x7aMRQ84qDM71Zh1+SzK5QwU0tJfA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.2",
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.2.tgz",
+ "integrity": "sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.2"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.2.tgz",
+ "integrity": "sha512-YAKxaiGsSQJ38VzKH86/BPRC4rh+b1Jpa+JneA5LRE7skmLPNAyeG8kPJj/oo4STLvlrs8vkf/iYyc3A5stYCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.1"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-visually-hidden": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.2.tgz",
+ "integrity": "sha512-1SzA4ns2M1aRlvxErqhLHsBHoS5eI5UUcI2awAMgGUp4LoaoWOKYmvqDY2s/tltuPkh3Yk77YF/r3IRj+Amx4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.2"
},
"peerDependencies": {
"@types/react": "*",
diff --git a/package.json b/package.json
index 00fb116..bdb0e39 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"@radix-ui/react-dialog": "^1.1.5",
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-label": "^2.1.1",
- "@radix-ui/react-select": "^2.1.4",
+ "@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-switch": "^1.1.2",
diff --git a/store/cart-store.ts b/store/cart-store.ts
index 214a74e..99d9201 100644
--- a/store/cart-store.ts
+++ b/store/cart-store.ts
@@ -54,6 +54,7 @@ const useCartStore = create(
set({cartItems: [...get().cartItems]})
}
},
+
decreaseQuantity: productId => {
const itemExists = get().cartItems.find(
cartItem => cartItem.id === productId