This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useCart } from "@/app/[name]/(Main)/cart/hook/useCart";
|
||||
import MinusIcon from "@/components/icons/MinusIcon";
|
||||
import PlusIcon from "@/components/icons/PlusIcon";
|
||||
import { toast } from "@/components/Toast";
|
||||
import { toast, toastLoginRequired } from "@/components/Toast";
|
||||
import { getToken } from "@/lib/api/func";
|
||||
import { ef } from "@/lib/helpers/utfNumbers";
|
||||
import { motion } from "framer-motion";
|
||||
@@ -52,7 +52,7 @@ function FoodPage({}: Props) {
|
||||
|
||||
const token = await getToken();
|
||||
if (!token || !isSuccess) {
|
||||
toast("ابتدا لاگین کنید", "error");
|
||||
toastLoginRequired(() => router.push(`/${name}/auth`), "error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user