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:
commit
cced7498d7
20
frontend/src/components/PageLayout/index.tsx
Normal file
20
frontend/src/components/PageLayout/index.tsx
Normal 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>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user