1
- import { ActionIcon , Anchor , AppShell , Burger , Button , Flex , Group , Modal , NavLink , NumberInput , ScrollArea , Stack , Switch , Text } from '@mantine/core'
1
+ import { ActionIcon , Anchor , AppShell , Burger , Button , Flex , Grid , Group , MantineStyleProp , Modal , NavLink , NumberInput , rem , ScrollArea , Stack , Switch , Text } from '@mantine/core'
2
2
import { useDisclosure } from '@mantine/hooks'
3
3
import { IconApple , IconCamera , IconGraph , IconImageInPicture , IconMap , IconSchema , IconSettings , IconWorld } from '@tabler/icons-react' ;
4
4
import { Link , Route , Routes } from 'react-router-dom' ;
@@ -96,6 +96,22 @@ function App() {
96
96
97
97
const [ noticeOpened , noticeCallbacks ] = useDisclosure ( false ) ;
98
98
99
+ const GRID_HEIGHT = "calc(100vh - 68px)"
100
+ const GRID_LEFT : MantineStyleProp = {
101
+ //backgroundColor: "blue",
102
+ overflowY : "auto" ,
103
+ minHeight : GRID_HEIGHT ,
104
+ maxHeight : GRID_HEIGHT ,
105
+ padding : "1rem"
106
+ }
107
+ const GRID_RIGHT : MantineStyleProp = {
108
+ // backgroundColor: "red",
109
+ padding : "2px" ,
110
+ // overflowY: "auto",
111
+ minHeight : GRID_HEIGHT ,
112
+ maxHeight : GRID_HEIGHT
113
+ }
114
+
99
115
return (
100
116
< >
101
117
< MapOMaticContext . Provider value = { mapOMatic } >
@@ -106,7 +122,6 @@ function App() {
106
122
breakpoint : "sm" ,
107
123
collapsed : { desktop : ! navOpened } ,
108
124
} }
109
- padding = "md"
110
125
>
111
126
< AppShell . Header >
112
127
< Group h = "100%" px = "md" >
@@ -179,8 +194,8 @@ function App() {
179
194
</ AppShell . Navbar >
180
195
< AppShell . Main >
181
196
< Notice close = { noticeCallbacks . close } open = { noticeCallbacks . open } opened = { noticeOpened } />
182
- < Flex style = { { height : '85vh' } } > { /* Full height container */ }
183
- < ScrollArea style = { { width : '50%' , height : '100%' } } > { /* Left pane */ }
197
+ < Grid align = "stretch" gutter = { { base : 0 } } >
198
+ < Grid . Col span = { 6 } style = { GRID_LEFT } >
184
199
< Routes >
185
200
< Route path = '/' element = { < ProjectPage /> } />
186
201
< Route path = '/project' element = { < ProjectPage /> } />
@@ -189,11 +204,12 @@ function App() {
189
204
< Route path = '/images' element = { < Images /> } />
190
205
< Route path = '/event-graph' element = { < EventGraph /> } />
191
206
</ Routes >
192
- </ ScrollArea >
193
- < ScrollArea style = { { width : '50%' , height : '100%' } } > { /* Right pane */ }
207
+
208
+ </ Grid . Col >
209
+ < Grid . Col span = { 6 } style = { GRID_RIGHT } >
194
210
< RendererPage />
195
- </ ScrollArea >
196
- </ Flex >
211
+ </ Grid . Col >
212
+ </ Grid >
197
213
</ AppShell . Main >
198
214
</ AppShell >
199
215
</ MapOMaticContext . Provider >
0 commit comments