utils: dont require dev for hosted

This commit is contained in:
Hunter Miller 2023-10-23 15:36:47 -05:00
parent 7211a66d7a
commit 4b92f52d8b

View File

@ -15,8 +15,20 @@ import { useCallback, useState } from 'react';
export const useMockData = import.meta.env.MODE === 'mock';
export const isStagingHosted =
import.meta.env.DEV ||
import.meta.env.VITE_SHIP_URL.endsWith('.test.tlon.systems') ||
window.location.hostname.endsWith('.test.tlon.systems');
export const isHosted =
import.meta.env.DEV || window.location.hostname.endsWith('.tlon.network');
isStagingHosted ||
import.meta.env.VITE_SHIP_URL.endsWith('.tlon.network') ||
window.location.hostname.endsWith('.tlon.network');
export const hostingUploadURL = isStagingHosted
? 'https://memex.test.tlon.systems'
: isHosted
? 'https://memex.tlon.network'
: '';
export async function fakeRequest<T>(data: T, time = 300): Promise<T> {
return new Promise((resolve) => {