mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 02:45:49 +03:00
utils: dont require dev for hosted
This commit is contained in:
parent
7211a66d7a
commit
4b92f52d8b
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user