diff --git a/package-lock.json b/package-lock.json index 85cf0e6..1692ea5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@radix-ui/react-slot": "^1.1.0", "@supabase/ssr": "^0.4.1", "@supabase/supabase-js": "^2.45.2", + "b2d-ventures": "file:", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "embla-carousel-react": "^8.2.0", @@ -27,6 +28,7 @@ "react": "^18", "react-countup": "^6.5.3", "react-dom": "^18", + "react-hot-toast": "^2.4.1", "tailwind-merge": "^2.5.2", "tailwindcss-animate": "^1.0.7" }, @@ -1761,6 +1763,10 @@ "deep-equal": "^2.0.5" } }, + "node_modules/b2d-ventures": { + "resolved": "", + "link": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2016,8 +2022,7 @@ "node_modules/csstype": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "devOptional": true + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/damerau-levenshtein": { "version": "1.0.8", @@ -3204,6 +3209,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/goober": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.14.tgz", + "integrity": "sha512-4UpC0NdGyAFqLNPnhCT2iHpza2q+RAY3GV85a/mRPdzyPQMsj0KmMMuetdIkzWRbJ+Hgau1EZztq8ImmiMGhsg==", + "peerDependencies": { + "csstype": "^3.0.10" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -4677,6 +4690,21 @@ "react": "^18.3.1" } }, + "node_modules/react-hot-toast": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz", + "integrity": "sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==", + "dependencies": { + "goober": "^2.1.10" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index c97d094..0d42173 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@radix-ui/react-slot": "^1.1.0", "@supabase/ssr": "^0.4.1", "@supabase/supabase-js": "^2.45.2", + "b2d-ventures": "file:", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "embla-carousel-react": "^8.2.0", @@ -28,6 +29,7 @@ "react": "^18", "react-countup": "^6.5.3", "react-dom": "^18", + "react-hot-toast": "^2.4.1", "tailwind-merge": "^2.5.2", "tailwindcss-animate": "^1.0.7" }, diff --git a/src/app/invest/page.tsx b/src/app/invest/page.tsx index aead347..f3f3a38 100644 --- a/src/app/invest/page.tsx +++ b/src/app/invest/page.tsx @@ -2,19 +2,55 @@ import React, { useState, useEffect } from "react"; import Image from "next/image"; -import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "@/components/ui/carousel"; +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, +} from "@/components/ui/carousel"; import { Card, CardContent } from "@/components/ui/card"; import CountUp from "react-countup"; import { Progress } from "@/components/ui/progress"; import { Separator } from "@/components/ui/separator"; 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 { Skeleton } from "@/components/ui/skeleton"; export default function Invest() { const [progress, setProgress] = useState(0); const [tab, setTab] = useState("Pitch"); + const { session, loading } = useSession(); + const user = session?.user; + const [sessionLoaded, setSessionLoaded] = React.useState(false); const handleClick = (item: string) => { setTab(item); }; + const currentUrl = window.location.href; + const handleShare = () => { + if (document.hasFocus()) { + navigator.clipboard.writeText(currentUrl).then(() => { + toast.success("URL copied to clipboard!"); + }); + } + }; + const handleFollow = () =>{ + {sessionLoaded ? ( + user ? ( + // if login, save follow + null + ) : ( + redirect('/login') + ) + ) : ( +
Worlds first non-metal sustainable battery
+World's first non-metal sustainable battery
5% raised of $5M max goal
@@ -76,67 +127,27 @@ export default function Invest() {Left to invest
- +