Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,23 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^2.4.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.119",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"axios": "^1.7.9",
"jwt-decode": "^4.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.53.2",
"react-redux": "^9.1.2",
"react-router-dom": "^6.28.0",
"react-scripts": "5.0.1",
"redux": "^5.0.1",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="/manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
18 changes: 15 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Route, Routes } from "react-router-dom";
import { Navigate, Route, Routes } from "react-router-dom";
import "./App.css";
import MainPage from "./page/MainPage";
import AddItemPage from "./page/AddItemPage";
Expand All @@ -9,13 +9,25 @@ import Privacy from "./components/Privacy";
import FAQ from "./components/FAQ";
import LoginPage from "./page/LoginPage";
import RegisterPage from "./page/RegisterPage";
import { useSelector } from "react-redux";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 프로젝트 하기 전에 미리 리덕스를 활용해보시는군요. 좋습니다 👍


function App() {
const count = useSelector((state: any) => state.counter.value);
return (
<Routes>
<Route path={ROUTES.LANDING} element={<LandingPage />} />
<Route path={ROUTES.LOGIN} element={<LoginPage />} />
<Route path={ROUTES.REGISTER} element={<RegisterPage />} />
<Route
path={ROUTES.LOGIN}
element={
count === true ? <Navigate to={ROUTES.LANDING} /> : <LoginPage />
}
/>
<Route
path={ROUTES.REGISTER}
element={
count === true ? <Navigate to={ROUTES.LANDING} /> : <RegisterPage />
}
/>
<Route path={ROUTES.PRIVACY} element={<Privacy />} />
<Route path={ROUTES.FAQ} element={<FAQ />} />
<Route path={ROUTES.MAIN}>
Expand Down
Loading
Loading