mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-14 10:04:03 +00:00
fix: incorrect env vars
This commit is contained in:
parent
23aed39118
commit
434b196100
|
@ -22,8 +22,11 @@ export function HomeCTA() {
|
||||||
const [waitlistSubmitted, setWaitlistSubmitted] = useState(false);
|
const [waitlistSubmitted, setWaitlistSubmitted] = useState(false);
|
||||||
const [fire, setFire] = useState<boolean | number>(false);
|
const [fire, setFire] = useState<boolean | number>(false);
|
||||||
|
|
||||||
const prod = import.meta.env.NODE_ENV === 'production';
|
const url = import.meta.env.PROD
|
||||||
const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
|
? 'https://waitlist-api.spacedrive.com'
|
||||||
|
: 'http://localhost:3000';
|
||||||
|
|
||||||
|
console.log(import.meta.env);
|
||||||
|
|
||||||
async function handleWaitlistSubmit<SubmitHandler>({ email }: WaitlistInputs) {
|
async function handleWaitlistSubmit<SubmitHandler>({ email }: WaitlistInputs) {
|
||||||
if (!email.trim().length) return;
|
if (!email.trim().length) return;
|
||||||
|
|
|
@ -50,7 +50,7 @@ function Page() {
|
||||||
if (!cuid) return;
|
if (!cuid) return;
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const prod = import.meta.env.NODE_ENV === 'production';
|
const prod = import.meta.env.PROD;
|
||||||
const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
|
const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
|
||||||
|
|
||||||
const req = await fetch(`${url}/api/waitlist?i=${cuid}`, {
|
const req = await fetch(`${url}/api/waitlist?i=${cuid}`, {
|
||||||
|
|
Loading…
Reference in a new issue