mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
fix(nui): Main content wrapper
This commit is contained in:
1 parent
6493762795
commit
bee8f5881a
3 files changed
+23
-11
No files matched your search
@@ -5,6 +5,7 @@ import SideBar from './NavBars/LeftBar';
|
|||||||
import { Routes, Route } from 'react-router-dom';
|
import { Routes, Route } from 'react-router-dom';
|
||||||
import Resource from './Resource';
|
import Resource from './Resource';
|
||||||
import RightBar from './NavBars/RightBar';
|
import RightBar from './NavBars/RightBar';
|
||||||
|
import Content from './MainContent';
|
||||||
|
|
||||||
debugData([
|
debugData([
|
||||||
{
|
{
|
||||||
@@ -20,9 +21,11 @@ const App: React.FC = () => {
|
|||||||
<TopBar />
|
<TopBar />
|
||||||
<SideBar />
|
<SideBar />
|
||||||
<RightBar />
|
<RightBar />
|
||||||
<Routes>
|
<Content>
|
||||||
<Route path="/:resource" element={<Resource />} />
|
<Routes>
|
||||||
</Routes>
|
<Route path="/:resource" element={<Resource />} />
|
||||||
|
</Routes>
|
||||||
|
</Content>
|
||||||
</Box>
|
</Box>
|
||||||
</Center>
|
</Center>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Box, Center } from '@chakra-ui/react';
|
||||||
|
|
||||||
|
const Content: React.FC = ({ children }) => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Center h="95%">
|
||||||
|
<Box h="100%" w="95%" backgroundColor="#1B2129">
|
||||||
|
{children}
|
||||||
|
</Box>
|
||||||
|
</Center>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Content;
|
||||||
@@ -1,16 +1,9 @@
|
|||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Box, Center } from '@chakra-ui/react';
|
|
||||||
|
|
||||||
const Resource: React.FC = () => {
|
const Resource: React.FC = () => {
|
||||||
let { resource } = useParams();
|
let { resource } = useParams();
|
||||||
|
|
||||||
return (
|
return <h2>{resource}</h2>;
|
||||||
<Center h="95%">
|
|
||||||
<Box h="100%" w="95%" backgroundColor="#1B2129">
|
|
||||||
<h2>{resource}</h2>
|
|
||||||
</Box>
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Resource;
|
export default Resource;
|
||||||
Reference in new issue
Block a user