mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-19 13:55:40 -04:00
refactor: switch from process.env to import.meta.env
This commit is contained in:
@@ -16,7 +16,7 @@ export function HomeCTA() {
|
||||
const [waitlistEmail, setWaitlistEmail] = useState('');
|
||||
const [fire, setFire] = useState<boolean | number>(false);
|
||||
|
||||
const prod = process.env.NODE_ENV === 'production';
|
||||
const prod = import.meta.env.NODE_ENV === 'production';
|
||||
const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
|
||||
|
||||
async function handleWaitlistSubmit(e: FormEvent<HTMLFormElement>) {
|
||||
|
||||
@@ -50,7 +50,7 @@ function Page() {
|
||||
if (!cuid) return;
|
||||
|
||||
(async () => {
|
||||
const prod = process.env.NODE_ENV === 'production';
|
||||
const prod = import.meta.env.NODE_ENV === 'production';
|
||||
const url = prod ? 'https://waitlist-api.spacedrive.com' : 'http://localhost:3000';
|
||||
|
||||
const req = await fetch(`${url}/api/waitlist?i=${cuid}`, {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
{
|
||||
"extends": "../../packages/config/interface.tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": [
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"compilerOptions": {},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user