From 7a6357b97f038b6624bf47119935024f0c339968 Mon Sep 17 00:00:00 2001
From: flu0r1ne <flu0r1ne@flu0r1ne.net>
Date: Fri, 8 Sep 2023 01:05:33 -0500
Subject: Rename DISPLAY_DOMAIN to SITE_DOMAIN for consistency

---
 utils/env.tsx | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

(limited to 'utils/env.tsx')

diff --git a/utils/env.tsx b/utils/env.tsx
index 1894c1b..fe56701 100644
--- a/utils/env.tsx
+++ b/utils/env.tsx
@@ -1,9 +1,22 @@
 import assert from './assert';
 
-const DISPLAY_DOMAIN = process.env.DISPLAY_DOMAIN;
+const SITE_DOMAIN = process.env.SITE_DOMAIN;
 
-assert(DISPLAY_DOMAIN !== undefined, 'Please set DISPLAY_DOMAIN');
+enum SiteDomain {
+  EXANDERIO = "exander.io",
+  FLU0R1NENET = "flu0r1ne.net"
+};
+
+assert(
+  SITE_DOMAIN === SiteDomain.EXANDERIO ||
+  SITE_DOMAIN === SiteDomain.FLU0R1NENET,
+  `Please set SITE_DOMAIN`
+);
+
+const DISPLAY_DOMAIN = SITE_DOMAIN === SiteDomain.EXANDERIO ? 'al.exander.io' : 'flu0r1ne.net';
 
 export {
-  DISPLAY_DOMAIN
+  SITE_DOMAIN,
+  SiteDomain,
+  DISPLAY_DOMAIN,
 };
-- 
cgit v1.2.3

