import { useState } from "react"; import { waitlistCollection } from "../firebase"; import { doc, setDoc } from "firebase/firestore"; const nameRegex = /^[A-Za-z\s.'-]+$/; const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; export const UpscaylCloudModal = ({ show, setShow, setDontShowCloudModal }) => { const [name, setName] = useState(""); const [email, setEmail] = useState(""); return (

Coming soon!

Introducing Upscayl Cloud!

No more errors, hardware issues, quality compromises or long loading times!

🌐 Upscayl anywhere, anytime, any device

☁️ No Graphics Card or hardware required

👩 Face Enhancement

🦋 10+ models to choose from

🏎 5x faster than Upscayl Desktop

🎞 Video Upscaling

💰 Commercial Usage

😴 Upscayl while you sleep

{ e.preventDefault(); if ( name && email && nameRegex.test(name) && emailRegex.test(email) ) { try { await setDoc(doc(waitlistCollection, email), { name, email, }); } catch (error) { alert( `Thank you ${name}! It seems that your email has already been registered :D If that's not the case, please try again.` ); return; } setName(""); setEmail(""); setDontShowCloudModal(true); setShow(false); alert( "Thank you for joining the waitlist! We will notify you when Upscayl Cloud is ready for you." ); } else { alert("Please fill in all the fields correctly."); } }}>
setName(e.target.value)} /> setEmail(e.target.value)} />
); };