diff --git a/src/pages/shop/section/productList/components/ListAllProduct.tsx b/src/pages/shop/section/productList/components/ListAllProduct.tsx index 2bb78be..081b833 100644 --- a/src/pages/shop/section/productList/components/ListAllProduct.tsx +++ b/src/pages/shop/section/productList/components/ListAllProduct.tsx @@ -4,11 +4,17 @@ import Alert from "../../../../../components/alert/Alert"; import Button from "../../../../../components/button"; import ModalBuy from "./ModalBuy"; import { useState } from "react"; +import { useSelector } from "react-redux"; +import { RootState } from "../../../../../redux/store"; +import { useNavigate } from "react-router-dom"; +import toast from "react-hot-toast"; const ListAllProduct = ({ activeId }: { activeId: number }) => { const axios = useAxios(); const [isOpen, setIsOpen] = useState(false); const [configId, setConfigId] = useState(1); + const { token } = useSelector((state: RootState) => state.token); + const navigate = useNavigate(); const { data, error, isLoading, isFetching } = useQuery({ queryKey: ["configs", activeId], queryFn: () => { @@ -67,15 +73,27 @@ const ListAllProduct = ({ activeId }: { activeId: number }) => {