diff --git a/web/app/page.tsx b/web/app/page.tsx index c223470..0b3bcac 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -24,9 +24,5 @@ function generateUniqueIndexes(arrayLength: number, count: number): number[] { export default function HomePage() { const promptIdxs = generateUniqueIndexes(EXAMPLE_PROMPTS.length, 6); - return ( -
- -
- ); + return ; } diff --git a/web/components/Disclaimer.tsx b/web/components/Disclaimer.tsx index 6f5cce3..2b89920 100644 --- a/web/components/Disclaimer.tsx +++ b/web/components/Disclaimer.tsx @@ -10,7 +10,7 @@ const Disclaimer = () => {
setShowDisclaimer(false)} - className='absolute top-4 right-4 text-indigo-800 hover:text-indigo-500 cursor-pointer' + className='absolute top-3 right-3 text-indigo-800 hover:text-indigo-500 cursor-pointer' size={20} weight='bold' /> @@ -18,8 +18,12 @@ const Disclaimer = () => {
This AI agent is experimental.
-
- The agent is evaluating projects based on self-reported data through past Gitcoin applications and therefore cannot guarantee their accuracy at this time. The agent also cannot guarantee that each project is still in control of its address, so please double check before sending large amounts. +
+ The agent is evaluating projects based on self-reported data through + past Gitcoin applications and therefore cannot guarantee their + accuracy at this time. The agent also cannot guarantee that each + project is still in control of its address, so please double check + before sending large amounts.
diff --git a/web/components/IntroPopUp.tsx b/web/components/IntroPopUp.tsx new file mode 100644 index 0000000..6ca2737 --- /dev/null +++ b/web/components/IntroPopUp.tsx @@ -0,0 +1,42 @@ +"use client"; + +import { X } from "@phosphor-icons/react/dist/ssr"; +import { SparkleIcon } from "./Icons"; +import { Dispatch, SetStateAction } from "react"; + +interface IntroPopupProps { + setShowIntro: Dispatch>; +} + +const IntroPopUp = ({ setShowIntro }: IntroPopupProps) => { + const handleClose = () => { + setShowIntro(false); + localStorage.setItem("introClosed", "true"); + }; + + return ( +
+ +
+
+ +
+ Welcome to fundpublicgoods.ai! +
+
+
+ This is a proof-of-concept to showcase the potential of AI agents to + assist users with complex transactions. Give it a try and let us know + what you think! +
+
+
+ ); +}; + +export default IntroPopUp; diff --git a/web/components/Prompt.tsx b/web/components/Prompt.tsx index 61ea4f3..f8021a1 100644 --- a/web/components/Prompt.tsx +++ b/web/components/Prompt.tsx @@ -9,9 +9,11 @@ import { startRun } from "@/app/actions"; import clsx from "clsx"; import { EXAMPLE_PROMPTS } from "@/utils/examplePrompts"; import { toast } from "react-toastify"; +import IntroPopUp from "./IntroPopUp"; export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) { const [prompt, setPrompt] = useState(""); + const [showIntro, setShowIntro] = useState(false); const [isWaiting, setIsWaiting] = useState(false); const { data: session } = useSession(); const searchParams = useSearchParams(); @@ -42,8 +44,19 @@ export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) { } }, [searchParams, router]); + useEffect(() => { + const introClosed = localStorage.getItem("introClosed"); + if (!introClosed) { + setShowIntro(true); + } + }, []); + return ( - <> +
@@ -88,6 +101,7 @@ export default function Prompt({ promptIdxs }: { promptIdxs: number[] }) {
- + {showIntro && } +
); }