♻️ Add env variable validation

This commit is contained in:
Meierschlumpf
2023-07-23 14:18:10 +02:00
parent 18e0e2a8ff
commit 3990c1a4ad
12 changed files with 140 additions and 25 deletions

View File

@@ -9,6 +9,7 @@ import {
} from '@tabler/icons-react';
import { i18n, useTranslation } from 'next-i18next';
import { ReactNode } from 'react';
import { env } from '~/env';
import { AccessibilitySettings } from './Accessibility/AccessibilitySettings';
import { GridstackConfiguration } from './Layout/GridstackConfiguration';
@@ -130,7 +131,7 @@ const getItems = () => {
),
},
];
if (process.env.NODE_ENV === 'development') {
if (env.NEXT_PUBLIC_NODE_ENV === 'development') {
items.push({
id: 'dev',
image: <IconCode />,