diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2023-09-06 19:53:23 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2023-09-06 19:53:23 -0500 |
| commit | 6e5037aacc594dbc4ba8e6c3f1824844c09263dd (patch) | |
| tree | 63a0e7031ad1db7488a5f576b4086ed7e91750df /utils | |
| parent | 9b438a42fa712ee131912bf7b5c54711af63e2a8 (diff) | |
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 +}; |
