Added a back button to the Product detail page
This commit is contained in:
@@ -8,12 +8,21 @@ import { useCartId } from '@/shared/hooks/cartId';
|
|||||||
import formatDate from '@/shared/lib/formatDate';
|
import formatDate from '@/shared/lib/formatDate';
|
||||||
import formatPrice from '@/shared/lib/formatPrice';
|
import formatPrice from '@/shared/lib/formatPrice';
|
||||||
import { cn } from '@/shared/lib/utils';
|
import { cn } from '@/shared/lib/utils';
|
||||||
|
import { Button } from '@/shared/ui/button';
|
||||||
import { Input } from '@/shared/ui/input';
|
import { Input } from '@/shared/ui/input';
|
||||||
import { Skeleton } from '@/shared/ui/skeleton';
|
import { Skeleton } from '@/shared/ui/skeleton';
|
||||||
import { userStore } from '@/widgets/welcome/lib/hook';
|
import { userStore } from '@/widgets/welcome/lib/hook';
|
||||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
import { Heart, Minus, Plus, Shield, ShoppingCart, Truck } from 'lucide-react';
|
import {
|
||||||
|
ChevronLeft,
|
||||||
|
Heart,
|
||||||
|
Minus,
|
||||||
|
Plus,
|
||||||
|
Shield,
|
||||||
|
ShoppingCart,
|
||||||
|
Truck,
|
||||||
|
} from 'lucide-react';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useParams } from 'next/navigation';
|
import { useParams } from 'next/navigation';
|
||||||
@@ -295,6 +304,16 @@ const ProductDetail = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="custom-container pb-8">
|
<div className="custom-container pb-8">
|
||||||
|
<div className="mb-5">
|
||||||
|
<Button
|
||||||
|
variant={'outline'}
|
||||||
|
className="w-fit"
|
||||||
|
onClick={() => router.back()}
|
||||||
|
>
|
||||||
|
<ChevronLeft />
|
||||||
|
{t('Orqaga')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 bg-white p-6 rounded-lg shadow">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 bg-white p-6 rounded-lg shadow">
|
||||||
<div>
|
<div>
|
||||||
<Image
|
<Image
|
||||||
|
|||||||
Reference in New Issue
Block a user