This commit is contained in:
hamid zarghami
2025-12-10 10:42:50 +03:30
parent 9248fe3cee
commit a18e052909
9 changed files with 279 additions and 109 deletions
+18 -2
View File
@@ -12,7 +12,11 @@ import HomeIcon from '../icons/HomeIcon'
import { useTranslation } from 'react-i18next';
import { useCart } from '@/app/[name]/(Dialogs)/cart/hook/useCart';
function BottomNavBar() {
type BottomNavBarProps = {
onPagerClick?: () => void;
};
function BottomNavBar({ onPagerClick }: BottomNavBarProps) {
const params = useParams();
const { name } = params;
const pathname = usePathname();
@@ -64,7 +68,19 @@ function BottomNavBar() {
}
value={t('Cart')}
/>
<BottomNavLink href={`/${name}/pager`} icon={<PagerIcon width={20} height={20} />} value={t('Pager')} />
{onPagerClick ? (
<button
onClick={onPagerClick}
className="flex flex-col justify-arround items-center gap-[5px] text-disabled2 pointer-events-auto dark:**:stroke-neutral-500"
>
<PagerIcon width={20} height={20} />
<span className="text-xs2 text-disabled-text">
{t('Pager')}
</span>
</button>
) : (
<BottomNavLink href={`/${name}/pager`} icon={<PagerIcon width={20} height={20} />} value={t('Pager')} />
)}
<BottomNavHighlightLink
href={`/${name}`}
icon={