19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
|
import './body.css'
|
||
|
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
|
||
|
import Index from '../../route/index';
|
||
|
|
||
|
const router = createBrowserRouter([
|
||
|
{
|
||
|
path: '/',
|
||
|
element: <Index />
|
||
|
}
|
||
|
])
|
||
|
|
||
|
export default function Body() {
|
||
|
const winHeight: number = window.innerHeight
|
||
|
return (
|
||
|
<div className="body" style={{height: `${winHeight - 145}px`}}>
|
||
|
<RouterProvider router={router}/>
|
||
|
</div>
|
||
|
)
|
||
|
}
|