Updated Sidebar to pull from NEXT_PUBLIC_BUILD_ENV instead of NODE.
This commit is contained in:
@@ -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 => ({
|
||||
@@ -180,15 +180,15 @@ export default function SidebarLayout({ children }: { children: React.ReactNode
|
||||
|
||||
{/* Right-aligned build label */}
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
sx={{
|
||||
fontWeight: 'bold',
|
||||
color: isDev ? 'error.main' : 'success.main',
|
||||
letterSpacing: 1,
|
||||
}}
|
||||
>
|
||||
{isDev ? 'DEVELOPMENT BUILD' : 'LIVE BUILD'}
|
||||
</Typography>
|
||||
variant="subtitle2"
|
||||
sx={{
|
||||
fontWeight: 'bold',
|
||||
color: isDev ? 'error.main' : 'success.main',
|
||||
letterSpacing: 1,
|
||||
}}
|
||||
>
|
||||
{isDev ? 'DEVELOPMENT BUILD' : 'LIVE BUILD'}
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
|
||||
</AppBar>
|
||||
|
||||
Reference in New Issue
Block a user