From 08cd5384bea520a7a01d020138e6a67f11e11dd9 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Tue, 12 Dec 2023 12:18:36 -0500 Subject: [PATCH] remove email submissions now that we have sign in --- .../src/components/TermsOfServiceDialog.tsx | 40 +++---------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/frontend/src/components/TermsOfServiceDialog.tsx b/frontend/src/components/TermsOfServiceDialog.tsx index b349335..b068287 100644 --- a/frontend/src/components/TermsOfServiceDialog.tsx +++ b/frontend/src/components/TermsOfServiceDialog.tsx @@ -7,9 +7,6 @@ import { AlertDialogHeader, AlertDialogTitle, } from "./ui/alert-dialog"; -import { Input } from "./ui/input"; -import toast from "react-hot-toast"; -import { PICO_BACKEND_FORM_SECRET } from "../config"; import { addEvent } from "../lib/analytics"; const LOGOS = ["microsoft", "amazon", "mit", "stanford", "bytedance", "baidu"]; @@ -18,40 +15,19 @@ const TermsOfServiceDialog: React.FC<{ open: boolean; onOpenChange: (open: boolean) => void; }> = ({ open, onOpenChange }) => { - const [email, setEmail] = React.useState(""); - - const onSubscribe = async () => { - await fetch("https://backend.buildpicoapps.com/form", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ email, secret: PICO_BACKEND_FORM_SECRET }), - }); - }; - return ( - Enter your email to get started + One last step -
- { - setEmail(e.target.value); - }} - /> -

- By providing your email, you consent to receiving occasional product - updates, and you accept the{" "} + You consent to receiving occasional product updates via email, and + you accept the{" "} { - if (!email.trim() || !email.trim().includes("@")) { - e.preventDefault(); - toast.error("Please enter your email"); - } else { - addEvent("EmailSubmit"); - onSubscribe(); - } + onClick={() => { + addEvent("EmailSubmit"); }} > Agree & Continue