diff --git a/src/App.tsx b/src/App.tsx index 3d7ded3..ee80782 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,34 +1,16 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from '/vite.svg' -import './App.css' +import React from 'react' +import { BrowserRouter, Routes, Route } from 'react-router-dom' +import MainPage from '@pages/index' +import AboutPage from '@pages/about' function App() { - const [count, setCount] = useState(0) - return ( - <> -
- - Vite logo - - - React logo - -
-

Vite + React

-
- -

- Edit src/App.tsx and save to test HMR -

-
-

- Click on the Vite and React logos to learn more -

- + + + }> + }> + + ) } diff --git a/src/main.tsx b/src/main.tsx index bef5202..20f0c16 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,6 @@ import { StrictMode } from 'react' import { createRoot } from 'react-dom/client' -import './index.css' +// import './index.css' import App from './App.tsx' createRoot(document.getElementById('root')!).render( diff --git a/src/pages/about.tsx b/src/pages/about.tsx new file mode 100644 index 0000000..2ba6af6 --- /dev/null +++ b/src/pages/about.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +function index() { + return ( +
about 페이지입니다.
+ ) +} + +export default index \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..a244f72 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +function index() { + return ( +
메인 홈페이지 파일입니다.
+ ) +} + +export default index \ No newline at end of file diff --git a/tsconfig.app.json b/tsconfig.app.json index 5ece222..2d09be1 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -30,13 +30,12 @@ "@/*": ["src/*"], "@components/*": ["src/components/*"], "@assets/*": ["src/assets/*"], - "@/components*": ["src/components*"], - "@/pages/*": ["src/pages/*"], - "@/types*": ["src/types*"], - "@/recoil/*": ["src/recoil/*"], - "@/apis/*": ["src/apis/*"], + "@pages/*": ["src/pages/*"], + "@types/*": ["src/types/*"], + "@recoil/*": ["src/recoil/*"], + "@apis/*": ["src/apis/*"], } }, "include": ["src"], - "references": [{"path": "./tsconfig.node.json"}] + // "references": [{"path": "./tsconfig.node.json"}] } diff --git a/tsconfig.json b/tsconfig.json index 1ffef60..0ac150d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,3 @@ { - "files": [], - "references": [ - { "path": "./tsconfig.app.json" }, - { "path": "./tsconfig.node.json" } - ] + "extends": "./tsconfig.app.json" }