From 20f086bff3d17b65dd38e18018f176759faac660 Mon Sep 17 00:00:00 2001 From: Pooria Setayesh Date: Sat, 4 May 2024 17:14:02 +0330 Subject: [PATCH] feat: set correct link for best selling page --- src/components/Header/components/BottomSection.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Header/components/BottomSection.tsx b/src/components/Header/components/BottomSection.tsx index 8bcd860..a91f2f6 100644 --- a/src/components/Header/components/BottomSection.tsx +++ b/src/components/Header/components/BottomSection.tsx @@ -2,14 +2,19 @@ import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import { useTranslations } from 'next-intl'; import { Link as NextLink } from '@/navigation'; +import { bestSellingSortOption } from '@/static/sortOptions'; const BottomSection = () => { const t = useTranslations(); + const pages = [ { label: t('header.navigation.products'), href: '/search' }, { label: t('header.navigation.categories'), href: '/categories' }, - { label: t('header.navigation.promotions'), href: '/best-selling' }, - { label: t('header.navigation.bestSelling'), href: '/promotion-center' }, + { + label: t('header.navigation.bestSelling'), + href: `/search?sort=${bestSellingSortOption.key}`, + }, + { label: t('header.navigation.promotions'), href: '/promotion-center' }, ]; return (