From a3686cb229876f38c43c7803556be2fe19be78bf Mon Sep 17 00:00:00 2001 From: Pattadon Date: Fri, 13 Sep 2024 11:02:38 +0700 Subject: [PATCH] Refactor UI components, update links in Home page --- src/app/invest/page.tsx | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) 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') - ) - ) : ( -
- -
- )} - } +
+ +
+ ); + } + }; useEffect(() => { // percent success const timer = setTimeout(() => setProgress(66), 500); @@ -67,13 +66,10 @@ export default function Invest() { logo

NVIDIA

-
+
-
+