fix order history bold
This commit is contained in:
@@ -4,14 +4,13 @@ import React from 'react'
|
||||
import Link from 'next/link'
|
||||
import BottomNavLink from './BottomNavLink'
|
||||
import BottomNavHighlightLink from './BottomNavLinkBig'
|
||||
import ReceiptIcon from '../icons/ReceiptIcon'
|
||||
import BagIcon from '../icons/BagIcon'
|
||||
import HeartIcon from '../icons/HeartIcon'
|
||||
import { useParams, usePathname, useRouter } from 'next/navigation'
|
||||
import HomeIcon from '../icons/HomeIcon'
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useCart } from '@/app/[name]/(Dialogs)/cart/hook/useCart';
|
||||
import { Building } from 'iconsax-react';
|
||||
import { Building, Receipt21 } from 'iconsax-react';
|
||||
import clsx from 'clsx';
|
||||
import { useGetProfile } from '@/app/[name]/(Profile)/profile/hooks/userProfileData';
|
||||
import { toast } from '../Toast';
|
||||
@@ -23,9 +22,13 @@ function BottomNavBar() {
|
||||
const pathname = usePathname();
|
||||
const isHomeRoute = pathname === `/${name}`;
|
||||
const isAboutRoute = pathname.includes('about');
|
||||
const isOrderRoute = pathname.includes('order');
|
||||
const buildingVariant = React.useMemo(() => {
|
||||
return (isAboutRoute ? 'Bold' : 'Outline') as 'Bold' | 'Outline';
|
||||
}, [isAboutRoute]);
|
||||
const orderVariant = React.useMemo(() => {
|
||||
return (isOrderRoute ? 'Bold' : 'Outline') as 'Bold' | 'Outline';
|
||||
}, [isOrderRoute]);
|
||||
const { isSuccess } = useGetProfile()
|
||||
const router = useRouter()
|
||||
const { t } = useTranslation('common', {
|
||||
@@ -77,7 +80,27 @@ function BottomNavBar() {
|
||||
icon={<BagIcon width={20} height={20} />}
|
||||
value={t('Cart')}
|
||||
/>
|
||||
<BottomNavLink href={`/${name}/order/history`} icon={<ReceiptIcon width={20} height={20} />} value={t('Orders')} />
|
||||
|
||||
<Link
|
||||
href={`/${name}/order/history`}
|
||||
className={clsx(
|
||||
'flex flex-col justify-arround items-center gap-[5px] text-primary pointer-events-auto **:stroke-primary min-w-0 dark:text-white dark:**:stroke-white'
|
||||
)}
|
||||
>
|
||||
<div className="shrink-0 text-primary dark:text-white">
|
||||
<Receipt21
|
||||
key={`receipt-${orderVariant}-${isOrderRoute}`}
|
||||
size={20}
|
||||
variant={orderVariant}
|
||||
color="currentColor"
|
||||
className='stroke-0'
|
||||
/>
|
||||
</div>
|
||||
<span className="text-xs2 text-center truncate w-full dark:text-white">
|
||||
{t('Orders')}
|
||||
</span>
|
||||
</Link>
|
||||
{/* <BottomNavLink href={`/${name}/order/history`} icon={<ReceiptIcon width={20} height={20} />} value={t('Orders')} /> */}
|
||||
<BottomNavHighlightLink
|
||||
href={`/${name}`}
|
||||
icon={
|
||||
|
||||
Reference in New Issue
Block a user