diff --git a/src/app/invest/page.tsx b/src/app/invest/page.tsx index f3f3a38..3722033 100644 --- a/src/app/invest/page.tsx +++ b/src/app/invest/page.tsx @@ -17,7 +17,7 @@ import { Button } from "@/components/ui/button"; import { ShareIcon, StarIcon } from "lucide-react"; import { Toaster, toast } from "react-hot-toast"; import useSession from "@/lib/supabase/useSession"; -import { redirect } from 'next/navigation' +import { redirect } from "next/navigation"; import { Skeleton } from "@/components/ui/skeleton"; export default function Invest() { @@ -37,20 +37,19 @@ export default function Invest() { }); } }; - const handleFollow = () =>{ - {sessionLoaded ? ( - user ? ( - // if login, save follow - null + const handleFollow = () => { + { + sessionLoaded ? ( + user ? null : ( // if login, save follow + redirect("/login") + ) ) : ( - redirect('/login') - ) - ) : ( -