File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,21 @@ const montserrat = Montserrat({
1414} ) ;
1515
1616const RootLayout = ( { children } : { children : ReactNode } ) => {
17+ // check env vars
1718 const devMode = process . env . NODE_ENV === 'development' ;
19+ const isGridOverlayOverride = process . env . GRID_OVERLAY_OVERRIDE === 'true' ;
20+
21+ // show grid overlay if dev mode is true or if the grid overlay override is true
22+ const showGridOverlay = devMode || isGridOverlayOverride ;
1823
1924 return (
2025 < html lang = "en" className = { montserrat . variable } >
2126 < body >
2227 { /* DEV GRID TOGGLE */ }
23- { devMode && < GridOverlayToggle /> }
28+ { showGridOverlay && < GridOverlayToggle /> }
2429
2530 { /* MAIN CONTENT */ }
26- { /* GRID OVERLAY relies on the main layout class */ }
31+ { /* GRID OVERLAY relies on the layout class */ }
2732 < main data-grid-overlay className = { 'layout' } >
2833 { children }
2934 </ main >
You can’t perform that action at this time.
0 commit comments