From 5b1303dc203f59543d25ba3a62431c556b686e84 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Mon, 20 Nov 2023 12:38:40 -0500 Subject: [PATCH] add TermsOfServiceDialog for hosted version --- frontend/src/App.tsx | 2 + .../src/components/TermsOfServiceDialog.tsx | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 frontend/src/components/TermsOfServiceDialog.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ea095c0..c2ec3fe 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -23,6 +23,7 @@ import { PicoBadge } from "./components/PicoBadge"; import { OnboardingNote } from "./components/OnboardingNote"; import { usePersistedState } from "./hooks/usePersistedState"; import { UrlInputSection } from "./components/UrlInputSection"; +import TermsOfServiceDialog from "./components/TermsOfServiceDialog"; function App() { const [appState, setAppState] = useState<"INITIAL" | "CODING" | "CODE_READY">( @@ -113,6 +114,7 @@ function App() { return (
{IS_RUNNING_ON_CLOUD && } + {IS_RUNNING_ON_CLOUD && }
diff --git a/frontend/src/components/TermsOfServiceDialog.tsx b/frontend/src/components/TermsOfServiceDialog.tsx new file mode 100644 index 0000000..12b90ee --- /dev/null +++ b/frontend/src/components/TermsOfServiceDialog.tsx @@ -0,0 +1,50 @@ +import { + Dialog, + DialogClose, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { useState } from "react"; + +function TermsOfServiceDialog() { + const [isOpen, setIsOpen] = useState(true); + + return ( + + + + Terms of Service + +
+ + By using this website, you agree to the{" "} + + terms of service + + . This project is MIT licensed.{" "} + + You can run this app locally by downloading the source code from + Github. + + +
+ + + Agree + +
+
+ ); +} + +export default TermsOfServiceDialog;