This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useCart } from '@/app/[name]/(Dialogs)/cart/hook/useCart'
|
||||
import { useCart } from '@/app/[name]/(Main)/cart/hook/useCart'
|
||||
import { useGetProfile } from '@/app/[name]/(Profile)/profile/hooks/userProfileData'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { useEffect, useRef, type FC } from 'react'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
"use client";
|
||||
|
||||
import { useCart } from "@/app/[name]/(Dialogs)/cart/hook/useCart";
|
||||
import { useCart } from "@/app/[name]/(Main)/cart/hook/useCart";
|
||||
import type { Food, FoodImage } from "@/app/[name]/(Main)/types/Types";
|
||||
import MinusIcon from "@/components/icons/MinusIcon";
|
||||
import PlusIcon from "@/components/icons/PlusIcon";
|
||||
|
||||
@@ -10,7 +10,7 @@ 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 { useCart } from '@/app/[name]/(Main)/cart/hook/useCart';
|
||||
import { Building } from 'iconsax-react';
|
||||
import clsx from 'clsx';
|
||||
import { useGetProfile } from '@/app/[name]/(Profile)/profile/hooks/userProfileData';
|
||||
|
||||
@@ -11,12 +11,13 @@ type Props = {
|
||||
value: string
|
||||
} & LinkProps & React.AnchorHTMLAttributes<HTMLAnchorElement>
|
||||
|
||||
function BottomNavLink({ icon, value, href, ...restProps }: Props) {
|
||||
function BottomNavLink({ icon, value, href, prefetch, ...restProps }: Props) {
|
||||
const pathname = usePathname();
|
||||
const isActive = pathname === href;
|
||||
const shouldPrefetch = prefetch ?? true;
|
||||
|
||||
return (
|
||||
<Link {...restProps} href={href} className={clsx(
|
||||
<Link {...restProps} href={href} prefetch={shouldPrefetch} 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',
|
||||
isActive && 'text-primary-foreground **:stroke-primary-foreground',
|
||||
restProps.className ?? '',
|
||||
|
||||
@@ -32,7 +32,7 @@ function ClientSideWrapper({ children, className = 'h-full' }: Props) {
|
||||
initial={isInitial || !pathnameChanged ? false : { y: -10 }}
|
||||
animate={{ y: 0 }}
|
||||
exit={{ y: 0, transition: { duration: 0 } }}
|
||||
transition={{ duration: 0.3 }}
|
||||
transition={{ duration: 0.12 }}
|
||||
style={{ opacity: 1 }}
|
||||
className={clsx(className)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user