Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
add email support when access code is set
Abi Raja5c3fc7df397b
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsxindex d01f1231..bde3cae1 100644--- a/frontend/src/App.tsx+++ b/frontend/src/App.tsx@@ -172,7 +172,7 @@ function App() {return (<div className="mt-2">- {IS_RUNNING_ON_CLOUD && <PicoBadge />}+ {IS_RUNNING_ON_CLOUD && <PicoBadge settings={settings} />}{IS_RUNNING_ON_CLOUD && (<TermsOfServiceDialogopen={!settings.isTermOfServiceAccepted}diff --git a/frontend/src/components/PicoBadge.tsx b/frontend/src/components/PicoBadge.tsxindex bdd00832..70a4f206 100644--- a/frontend/src/components/PicoBadge.tsx+++ b/frontend/src/components/PicoBadge.tsx@@ -1,4 +1,6 @@-export function PicoBadge() {+import { Settings } from "../types";++export function PicoBadge({ settings }: { settings: Settings }) {return (<><a@@ -12,14 +14,26 @@ export function PicoBadge() {feature requests?</div></a>- <a href="https://picoapps.xyz?ref=screenshot-to-code" target="_blank">- <div- className="fixed z-50 bottom-5 right-5 rounded-md shadow text-black+ {!settings.accessCode && (+ <a href="https://picoapps.xyz?ref=screenshot-to-code" target="_blank">+ <div+ className="fixed z-50 bottom-5 right-5 rounded-md shadow text-blackbg-white px-4 text-xs py-3 cursor-pointer"- >- an open source project by Pico- </div>- </a>+ >+ an open source project by Pico+ </div>+ </a>+ )}+ {settings.accessCode && (+ <a href="mailto:[email protected]" target="_blank">+ <div+ className="fixed z-50 bottom-5 right-5 rounded-md shadow text-black+ bg-white px-4 text-xs py-3 cursor-pointer"+ >+ email support+ </div>+ </a>+ )}</>);}