From 28b43c43acd7d3250c86bf58ec3aebf7589dd04d Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
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..b9d3203 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 {
+  SAHINFIO = "sahinf.io",
+  FURKANNET = "furkistan.com"
+};
+
+assert(
+  SITE_DOMAIN === SiteDomain.SAHINFIO ||
+  SITE_DOMAIN === SiteDomain.FURKANNET,
+  `Please set SITE_DOMAIN`
+);
+
+const DISPLAY_DOMAIN = SITE_DOMAIN === SiteDomain.SAHINFIO ? 'sahinf.io' : 'furkistan.com';
 
 export {
-  DISPLAY_DOMAIN
+  SITE_DOMAIN,
+  SiteDomain,
+  DISPLAY_DOMAIN,
 };
-- 
cgit v1.2.3

