import './body.css'
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
import Index from '../../route/index';
import ProjCreate from "../../route/proj/ProjCreate.tsx";
import ProjNew from "../../route/proj/ProjNew.tsx";
import ProjEdit from "../../route/proj/ProjEdit.tsx";

const router = createBrowserRouter([
    {
        path: '/',
        element: <Index />
    },
    {
        path: '/proj-create',
        element: <ProjCreate />
    },
    {
        path: '/proj-new/:type/:price',
        element: <ProjNew />
    },
    {
        path: '/proj-edit',
        element: <ProjEdit />
    }
])

export default function Body() {
    const winHeight: number = window.innerHeight
    return (
        <div className="body" style={{height: `${winHeight - 145}px`}}>
            <RouterProvider router={router}/>
        </div>
    )
}