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