Updated Sidebar to pull from NEXT_PUBLIC_BUILD_ENV instead of NODE.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -39,3 +39,5 @@ yarn-error.log*
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
certificate (5).zip
|
||||
.gitea/workflows/deploy.yml
|
||||
|
||||
@@ -13,7 +13,8 @@ const nextConfig: NextConfig = {
|
||||
allowedDevOrigins: [
|
||||
'http://localhost:3000',
|
||||
'http://172.16.10.180:3000',
|
||||
'https://dev.psg.net.au',
|
||||
'dev.psg.net.au',
|
||||
'https://sys.psg.net.au',
|
||||
],
|
||||
|
||||
productionBrowserSourceMaps: false,
|
||||
|
||||
1
package-lock.json
generated
1
package-lock.json
generated
@@ -2535,7 +2535,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/react-window/-/react-window-1.8.8.tgz",
|
||||
"integrity": "sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
|
||||
@@ -3,15 +3,14 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"scripts": {
|
||||
"dev": "next dev --hostname 0.0.0.0 --port 3000",
|
||||
"dev:https": "cross-env NODE_ENV=development next dev --experimental-https --experimental-https-cert /etc/frontend/certs/dev.crt --experimental-https-key /etc/frontend/certs/dev.key --hostname 0.0.0.0 --port 3000",
|
||||
"dev:custom": "cross-env NODE_ENV=development node --loader ts-node/esm server.ts",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"start:prod": "cross-env PORT=3001 next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
|
||||
@@ -38,7 +38,7 @@ import { useAuth } from '@/context/AuthContext';
|
||||
|
||||
const collapsedDrawerWidth = 65;
|
||||
const drawerWidth = 240;
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isDev = process.env.NEXT_PUBLIC_BUILD_ENV === 'dev';
|
||||
|
||||
|
||||
const openedMixin = (theme: Theme): CSSObject => ({
|
||||
@@ -186,9 +186,9 @@ export default function SidebarLayout({ children }: { children: React.ReactNode
|
||||
color: isDev ? 'error.main' : 'success.main',
|
||||
letterSpacing: 1,
|
||||
}}
|
||||
>
|
||||
>
|
||||
{isDev ? 'DEVELOPMENT BUILD' : 'LIVE BUILD'}
|
||||
</Typography>
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
|
||||
</AppBar>
|
||||
|
||||
Reference in New Issue
Block a user