diff options
author | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-09-06 19:53:23 -0500 |
---|---|---|
committer | flu0r1ne <flu0r1ne@flu0r1ne.net> | 2023-09-06 19:53:23 -0500 |
commit | ef4fb0a5277ee99bd0f1747b77e733ef7f02460d (patch) | |
tree | 2c7b306eaa814dedccb987a28a1cd050fdd94136 /utils | |
parent | a66d6b395e22d6506319cc20b6dfab0e88cb0f39 (diff) | |
download | homepage-ef4fb0a5277ee99bd0f1747b77e733ef7f02460d.tar.xz homepage-ef4fb0a5277ee99bd0f1747b77e733ef7f02460d.zip |
Make BreadCrumbs domain agnostic
Diffstat (limited to 'utils')
-rw-r--r-- | utils/assert.tsx | 3 | ||||
-rw-r--r-- | utils/env.tsx | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/utils/assert.tsx b/utils/assert.tsx new file mode 100644 index 0000000..0ee51a0 --- /dev/null +++ b/utils/assert.tsx @@ -0,0 +1,3 @@ +export default function assert(cond : boolean, message?: string) { + if(!cond) { throw Error(message); } +}; diff --git a/utils/env.tsx b/utils/env.tsx new file mode 100644 index 0000000..1894c1b --- /dev/null +++ b/utils/env.tsx @@ -0,0 +1,9 @@ +import assert from './assert'; + +const DISPLAY_DOMAIN = process.env.DISPLAY_DOMAIN; + +assert(DISPLAY_DOMAIN !== undefined, 'Please set DISPLAY_DOMAIN'); + +export { + DISPLAY_DOMAIN +}; |