diff --git a/src/App.tsx b/src/App.tsx index ca26fc14..14ddc033 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,10 +3,10 @@ import { Route, Routes } from 'react-router-dom'; import NotFound from '@/page/notFound'; import Home from '@/page/home'; import koKR from 'antd/locale/ko_KR'; -import Layout from '@/components/Layout'; import Signup from '@/page/signup'; import Singin from '@/page/signin'; import MyAccount from '@/page/myAccount'; +import MyLayout from '@/components/MyLayout'; export default function App() { const theme = { @@ -17,7 +17,7 @@ export default function App() { return ( - }> + }> } /> } /> } /> diff --git a/src/assets/react.svg b/src/assets/react.svg deleted file mode 100644 index 6c87de9b..00000000 --- a/src/assets/react.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx deleted file mode 100644 index 57e5df11..00000000 --- a/src/components/Layout.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { Outlet } from 'react-router-dom'; - -export default function Layout() { - return ( - <> -

레이아웃

- - - ); -} diff --git a/src/components/MyHeader.tsx b/src/components/MyHeader.tsx new file mode 100644 index 00000000..131156ad --- /dev/null +++ b/src/components/MyHeader.tsx @@ -0,0 +1,16 @@ +import { NAV_ITEMS } from '@/data/constants'; +import { Space } from 'antd'; +import { Header } from 'antd/es/layout/layout'; +import { Link } from 'react-router-dom'; + +export default function MyHeader() { + return ( +
+ + {NAV_ITEMS.map((item) => ( + {item.label} + ))} + +
+ ); +} diff --git a/src/components/MyLayout.tsx b/src/components/MyLayout.tsx new file mode 100644 index 00000000..109b3bb7 --- /dev/null +++ b/src/components/MyLayout.tsx @@ -0,0 +1,22 @@ +import { Layout } from 'antd'; +import { Content } from 'antd/es/layout/layout'; +import { Outlet } from 'react-router-dom'; +import MyHeader from './MyHeader'; + +export default function MyLayout() { + return ( + + + + + + + ); +} diff --git a/src/data/constants.ts b/src/data/constants.ts new file mode 100644 index 00000000..030336db --- /dev/null +++ b/src/data/constants.ts @@ -0,0 +1,18 @@ +export const NAV_ITEMS = [ + { + label: '홈', + href: '/', + }, + { + label: '로그인', + href: '/signin', + }, + { + label: '회원가입', + href: '/signup', + }, + { + label: '내계정', + href: '/myaccount', + }, +]; diff --git a/src/data/dummyData.ts b/src/data/dummyData.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/page/home/index.tsx b/src/page/home/index.tsx index 1adbedc4..3a407d18 100644 --- a/src/page/home/index.tsx +++ b/src/page/home/index.tsx @@ -1,3 +1,15 @@ +import { theme } from 'antd'; + export default function Home() { - return
홈🏠🏠🏠🏠
; + const { + token: { colorPrimary, colorPrimaryBg, colorSuccess }, + } = theme.useToken(); + + return ( +
+ 홈🏠🏠🏠🏠 사용하고 싶으색{' '} + 원하는 색을{' '} + theme에서 가져와서 사용 +
+ ); }