mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🔧 Move the layout inside the app
This commit is contained in:
parent
07fe793192
commit
64f9cd6a7c
1 changed files with 71 additions and 71 deletions
|
@ -37,70 +37,76 @@ import {ThemeProvider} from "./contexts/theme"
|
||||||
function App({..._}: RouteComponentProps) {
|
function App({..._}: RouteComponentProps) {
|
||||||
return React.useMemo(
|
return React.useMemo(
|
||||||
() => <>
|
() => <>
|
||||||
<ErrorCatcherBox>
|
<LayoutThreeCol>
|
||||||
<Chapter>
|
<LayoutThreeCol.Center>
|
||||||
<SophonDescriptionBox/>
|
<ThemedTitle level={1}/>
|
||||||
</Chapter>
|
<ErrorCatcherBox>
|
||||||
<InstanceProvider>
|
<Chapter>
|
||||||
<InstanceRouter
|
<SophonDescriptionBox/>
|
||||||
unselectedRoute={() => <>
|
</Chapter>
|
||||||
<InstanceFormBox/>
|
<InstanceProvider>
|
||||||
</>}
|
<InstanceRouter
|
||||||
selectedRoute={() => <>
|
unselectedRoute={() => <>
|
||||||
<Chapter>
|
<InstanceFormBox/>
|
||||||
<InstanceDescriptionBox/>
|
</>}
|
||||||
</Chapter>
|
selectedRoute={() => <>
|
||||||
<AuthorizationProvider>
|
<Chapter>
|
||||||
<CacheProvider>
|
<InstanceDescriptionBox/>
|
||||||
<AuthorizationRouter
|
</Chapter>
|
||||||
unselectedRoute={AuthorizationStepPage}
|
<AuthorizationProvider>
|
||||||
selectedRoute={() => <>
|
<CacheProvider>
|
||||||
<GroupRouter
|
<AuthorizationRouter
|
||||||
unselectedRoute={GroupStepPage}
|
unselectedRoute={AuthorizationStepPage}
|
||||||
selectedRoute={({selection}) => <>
|
selectedRoute={() => <>
|
||||||
<GroupProvider resource={selection}>
|
<GroupRouter
|
||||||
<Chapter>
|
unselectedRoute={GroupStepPage}
|
||||||
<ResourceDescriptionBox resource={selection} icon={faUsers}/>
|
selectedRoute={({selection}) => <>
|
||||||
<GroupMembersBox/>
|
<GroupProvider resource={selection}>
|
||||||
</Chapter>
|
<Chapter>
|
||||||
<ProjectRouter
|
<ResourceDescriptionBox resource={selection} icon={faUsers}/>
|
||||||
groupPk={selection.value.slug}
|
<GroupMembersBox/>
|
||||||
unselectedRoute={({viewSet}) => <>
|
</Chapter>
|
||||||
<GroupCreateBox resource={selection}/>
|
<ProjectRouter
|
||||||
<ProjectListBox viewSet={viewSet}/>
|
groupPk={selection.value.slug}
|
||||||
<ProjectCreateBox viewSet={viewSet}/>
|
unselectedRoute={({viewSet}) => <>
|
||||||
</>}
|
<GroupCreateBox resource={selection}/>
|
||||||
selectedRoute={({selection}) => <>
|
<ProjectListBox viewSet={viewSet}/>
|
||||||
<ProjectProvider resource={selection}>
|
<ProjectCreateBox viewSet={viewSet}/>
|
||||||
<ResourceDescriptionBox resource={selection} icon={faProjectDiagram}/>
|
</>}
|
||||||
<NotebookRouter
|
selectedRoute={({selection}) => <>
|
||||||
projectPk={selection.value.slug}
|
<ProjectProvider resource={selection}>
|
||||||
unselectedRoute={({viewSet}) => <>
|
<ResourceDescriptionBox resource={selection} icon={faProjectDiagram}/>
|
||||||
<ProjectCreateBox resource={selection}/>
|
<NotebookRouter
|
||||||
<NotebookListBox viewSet={viewSet}/>
|
projectPk={selection.value.slug}
|
||||||
<NotebookCreateBox viewSet={viewSet}/>
|
unselectedRoute={({viewSet}) => <>
|
||||||
</>}
|
<ProjectCreateBox resource={selection}/>
|
||||||
selectedRoute={({selection}) => <>
|
<NotebookListBox viewSet={viewSet}/>
|
||||||
<NotebookProvider resource={selection}>
|
<NotebookCreateBox viewSet={viewSet}/>
|
||||||
<NotebookDescriptionBox/>
|
</>}
|
||||||
<NotebookCreateBox resource={selection}/>
|
selectedRoute={({selection}) => <>
|
||||||
</NotebookProvider>
|
<NotebookProvider resource={selection}>
|
||||||
</>}
|
<NotebookDescriptionBox/>
|
||||||
/>
|
<NotebookCreateBox resource={selection}/>
|
||||||
</ProjectProvider>
|
</NotebookProvider>
|
||||||
</>}
|
</>}
|
||||||
/>
|
/>
|
||||||
</GroupProvider>
|
</ProjectProvider>
|
||||||
|
</>}
|
||||||
|
/>
|
||||||
|
</GroupProvider>
|
||||||
|
</>}
|
||||||
|
/>
|
||||||
</>}
|
</>}
|
||||||
/>
|
/>
|
||||||
</>}
|
</CacheProvider>
|
||||||
/>
|
</AuthorizationProvider>
|
||||||
</CacheProvider>
|
</>}
|
||||||
</AuthorizationProvider>
|
/>
|
||||||
</>}
|
</InstanceProvider>
|
||||||
/>
|
</ErrorCatcherBox>
|
||||||
</InstanceProvider>
|
<SophonFooter/>
|
||||||
</ErrorCatcherBox>
|
</LayoutThreeCol.Center>
|
||||||
|
</LayoutThreeCol>
|
||||||
</>,
|
</>,
|
||||||
[],
|
[],
|
||||||
)
|
)
|
||||||
|
@ -111,15 +117,9 @@ export default function AppWrapper() {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<ThemedBluelib>
|
<ThemedBluelib>
|
||||||
<LayoutThreeCol>
|
<Reach.Router>
|
||||||
<LayoutThreeCol.Center>
|
<App default/>
|
||||||
<ThemedTitle level={1}/>
|
</Reach.Router>
|
||||||
<Reach.Router>
|
|
||||||
<App default/>
|
|
||||||
</Reach.Router>
|
|
||||||
<SophonFooter/>
|
|
||||||
</LayoutThreeCol.Center>
|
|
||||||
</LayoutThreeCol>
|
|
||||||
</ThemedBluelib>
|
</ThemedBluelib>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue