Merge branch 'fe/feat/70-page-layout' into 'fe/develop'

Feat: 페이지 레이아웃 추가, 라우터 연결 - S11P21S002-70

See merge request s11-s-project/S11P21S002!13
This commit is contained in:
정현조 2024-08-28 16:41:47 +09:00
commit cced7498d7
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,20 @@
import { Outlet } from 'react-router-dom';
import Header from '../Header';
import Footer from '../Footer';
import { Suspense } from 'react';
export default function PageLayout() {
return (
<>
<Header className="fixed left-0 top-0 w-full" />
<div className="flex min-h-screen flex-col justify-between">
<div className="mt-16">
<Suspense fallback={<div></div>}>
<Outlet />
</Suspense>
</div>
<Footer className="mt-24" />
</div>
</>
);
}

View File

@ -1,3 +1,4 @@
import PageLayout from '@/components/PageLayout';
import WorkspaceLayout from '@/components/WorkspaceLayout'; import WorkspaceLayout from '@/components/WorkspaceLayout';
import { createBrowserRouter } from 'react-router-dom'; import { createBrowserRouter } from 'react-router-dom';
@ -9,7 +10,7 @@ export const webPath = {
const router = createBrowserRouter([ const router = createBrowserRouter([
{ {
path: webPath.home(), path: webPath.home(),
element: <div>home</div>, element: <PageLayout />,
children: [ children: [
{ {
index: true, index: true,