{projectData?.project_name}
+ +{projectData?.project_short_description}
+${projectData?.total_investment}
+5% raised of \$5M max goal
+ + + ++
{projectData?.total_investment}
+ +Investors
+ +1 hours
+Left to invest
+ + +diff --git a/src/app/deals/[id]/followShareButton.tsx b/src/app/deals/[id]/followShareButton.tsx new file mode 100644 index 0000000..d143860 --- /dev/null +++ b/src/app/deals/[id]/followShareButton.tsx @@ -0,0 +1,61 @@ +"use client"; + +import { useState, useEffect } from "react"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"; +import { ShareIcon, StarIcon } from "lucide-react"; +import { redirect } from "next/navigation"; +import useSession from "@/lib/supabase/useSession"; +import toast from "react-hot-toast"; + +const FollowShareButtons = () => { + const [progress, setProgress] = useState(0); + const [tab, setTab] = useState("Pitch"); + const { session, loading } = useSession(); + const user = session?.user; + const [sessionLoaded, setSessionLoaded] = useState(false); + const [isFollow, setIsFollow] = useState(false); + + useEffect(() => { + if (!loading) { + setSessionLoaded(true); + } + }, [loading]); + + const handleShare = () => { + const currentUrl = window.location.href; + if (document.hasFocus()) { + navigator.clipboard.writeText(currentUrl).then(() => { + toast.success("URL copied to clipboard!"); + }); + } + }; + const handleFollow = () => { + if (user) { + setIsFollow((prevState) => !prevState); + } else { + redirect("/login"); + } + }; + + return ( +
Follow NVIDIA
+{projectData?.project_short_description}
+5% raised of \$5M max goal
+ + + +{projectData?.total_investment}
+ +Investors
+ +1 hours
+Left to invest
+ + +general Content
+update Content
+