fast navigate + cache
Build and Deploy Docker Images / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-06-03 15:08:09 +03:30
parent b9608cd486
commit 194533ec5f
27 changed files with 218 additions and 194 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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";
+1 -1
View File
@@ -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';
+3 -2
View File
@@ -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 ?? '',
+1 -1
View File
@@ -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)}
>