Skip to content

Commit

Permalink
Merge pull request #234 from tloncorp/hm/bad-hosted-check
Browse files Browse the repository at this point in the history
utils: bad hosted check
  • Loading branch information
patosullivan authored Oct 23, 2023
2 parents ae05b86 + 8a9e486 commit 480d7dd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ui/src/logic/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ 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'));
import.meta.env.DEV ||
import.meta.env.VITE_SHIP_URL.endsWith('.test.tlon.systems') ||
window.location.hostname.endsWith('.test.tlon.systems');
export const isHosted =
isStagingHosted ||
(import.meta.env.DEV &&
(import.meta.env.VITE_SHIP_URL.endsWith('.tlon.network') ||
window.location.hostname.endsWith('.tlon.network')));
import.meta.env.VITE_SHIP_URL.endsWith('.tlon.network') ||
window.location.hostname.endsWith('.tlon.network');

export const hostingUploadURL = isStagingHosted
? 'https://memex.test.tlon.systems'
Expand Down

0 comments on commit 480d7dd

Please sign in to comment.