File tree Expand file tree Collapse file tree 2 files changed +28
-10
lines changed
Expand file tree Collapse file tree 2 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,24 @@ import ChatTemporature from "@/pages/ChatTemporature";
88import Content from "@/pages/Content" ;
99import Login from "@/pages/Login" ;
1010import KaKaoLogin from "@/pages/KaKaoLogin" ;
11+ import CenteredLayout from "./components/CenteredLayout" ;
1112
1213const App = ( ) => {
1314 return (
1415 < Router >
15- < Routes >
16- < Route path = "/" element = { < Home /> } />
17- < Route path = "/select-info" element = { < SelectInfo /> } />
18- < Route path = "/chat" element = { < Chat /> } />
19- < Route path = "/chat-recommend" element = { < ChatRecommend /> } />
20- < Route path = "/chat-tips" element = { < ChatTips /> } />
21- < Route path = "/chat-temporature" element = { < ChatTemporature /> } />
22- < Route path = "/contents/:id" element = { < Content /> } />
23- < Route path = "/login" element = { < Login /> } />
24- < Route path = "/kakao-login" element = { < KaKaoLogin /> } /> { " " }
16+ < CenteredLayout >
17+ < Routes >
18+ < Route path = "/" element = { < Home /> } />
19+ < Route path = "/select-info" element = { < SelectInfo /> } />
20+ < Route path = "/chat" element = { < Chat /> } />
21+ < Route path = "/chat-recommend" element = { < ChatRecommend /> } />
22+ < Route path = "/chat-tips" element = { < ChatTips /> } />
23+ < Route path = "/chat-temporature" element = { < ChatTemporature /> } />
24+ < Route path = "/contents/:id" element = { < Content /> } />
25+ < Route path = "/login" element = { < Login /> } />
26+ < Route path = "/kakao-login" element = { < KaKaoLogin /> } /> { " " }
2527 </ Routes >
28+ </ CenteredLayout >
2629 </ Router >
2730 ) ;
2831} ;
Original file line number Diff line number Diff line change 1+ import { ReactNode } from 'react' ;
2+
3+ interface CenteredLayoutProps {
4+ children : ReactNode ;
5+ }
6+
7+ const CenteredLayout = ( { children } : CenteredLayoutProps ) => (
8+ < div className = "flex justify-center w-screen" >
9+ < div className = "w-full flex justify-center" >
10+ { children }
11+ </ div >
12+ </ div >
13+ ) ;
14+
15+ export default CenteredLayout ;
You can’t perform that action at this time.
0 commit comments