fix: only display region select for cloud

This commit is contained in:
Scott Wilson
2024-09-30 09:58:49 -07:00
parent 2fa30bdd0e
commit 70aa73482e
@@ -80,8 +80,8 @@ export const RegionSelect = () => {
const [subdomain, domain] = window.location.host.split("."); const [subdomain, domain] = window.location.host.split(".");
// only display region select for local dev and cloud // only display region select for cloud
if (!(subdomain.match(/localhost:8080/) || domain.match(/infisical/))) return null; if (!domain?.match(/infisical/)) return null;
// default to US if not eu // default to US if not eu
const currentRegion = subdomain === Region.EU ? regions[1] : regions[0]; const currentRegion = subdomain === Region.EU ? regions[1] : regions[0];