Skip to content

Commit

Permalink
Merge pull request #99 from next-petree/boilerPlate
Browse files Browse the repository at this point in the history
Boiler plate
  • Loading branch information
ChanghyeonO authored Jan 21, 2024
2 parents 6144ae4 + fea6e2d commit 9f0e850
Show file tree
Hide file tree
Showing 81 changed files with 3,589 additions and 652 deletions.
98 changes: 98 additions & 0 deletions package-lock.json

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

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
"@types/styled-components": "^5.1.29",
"axios": "^1.6.0",
"react": "^18.2.0",
"react-datepicker": "^4.25.0",
"react-daum-postcode": "^3.1.3",
"react-dom": "^18.2.0",
"react-hook-form": "^7.47.0",
"react-icons": "^4.11.0",
"react-image-file-resizer": "^0.4.8",
"react-modal": "^3.16.1",
"react-redux": "^8.1.3",
"react-router-dom": "^6.17.0",
Expand All @@ -40,6 +42,7 @@
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@types/base-64": "^1.0.1",
"@types/react-datepicker": "^4.19.5",
"@types/react-table": "^7.7.18",
"typescript": "^4.9.5"
},
Expand All @@ -55,4 +58,4 @@
"last 1 safari version"
]
}
}
}
131 changes: 85 additions & 46 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,53 +29,92 @@ import Profile from "./pages/MyPage/profile";
import Breeder from "./pages/AdoptionRequestList/Breeder/Breeder";
import Adopter from "./pages/AdoptionRequestList/Adopter/Adopter";
import RemoveAccount from "./pages/RemoveAccount/RemoveAccount";
import ManageReview from "./pages/ManageReview/ManageReview";
import ManageOwnDogs from "./pages/ManageOwnDogs/ManageOwnDogs";
import CreateReview from "./pages/ManageReview/create/CreateReview";
import EditReview from "./pages/ManageReview/edit/EditReview";
import EditOwnDogs from "./pages/ManageOwnDogs/edit/EditOwnDogs";

function App() {
return (
<>
<Routes>
<Route path="/breeders/:pageId" element={<BreederCollect />} />
<Route path="/dogys/:pageId" element={<DogyCollect />} />
<Route path="/" element={<IntroPage />} />
<Route path="/login" element={<Login />} />
<Route path="oauth/kakao/callback" element={<LoginCheckForKakao />} />
<Route path="register" element={<Register />} />
<Route
path="register/breeder-detail"
element={<RegisterBreederDetail />}
/>
<Route
path="register/adopter-detail"
element={<RegisterAdopterDetail />}
/>
<Route path="success-register" element={<SuccessRegister />} />
<Route path="/find-email" element={<FindEmail />} />
<Route path="/find-password" element={<FindPassword />} />
<Route path="/find-email-result" element={<FindEmailResult />} />
<Route path="/change-password" element={<ChangePassword />} />
<Route
path="/change-password-result"
element={<ChangePasswordResult />}
/>
<Route path="" element={<PrivateRoute />}>
<Route path="/breeding-register" element={<BreedingRegister />} />
<Route path="/register-fillout" element={<RegisterFillOut />} />
<Route path="/breeding-complete" element={<BreedingComplete />} />
</Route>
<Route path="/breeder/:id" element={<BreederDetails />} />
<Route path="/customer-details" element={<CustomerDetails />} />
<Route path="/test-description" element={<TestDesc />}></Route>
<Route path="/basic-test" element={<Test />} />
<Route path="/result" element={<Result />} />
<Route path="/answer" element={<Answer />} />
<Route path="/certify" element={<Certify />} />
<Route path="/adoptlist/adopter" element={<Adopter />} />
<Route path="/adoptlist/breeder" element={<Breeder />} />
<Route path="/mypage/modifyauth" element={<ModifyAuth />} />
<Route path="/mypage/profile" element={<Profile />} />
<Route path="/mypage/remove-account" element={<RemoveAccount />} />
</Routes>
</>
);
return (
<>
<Routes>
<Route path="/breeders/:pageId" element={<BreederCollect />} />
<Route path="/dogys/:pageId" element={<DogyCollect />} />
<Route path="/" element={<IntroPage />} />
<Route path="/login" element={<Login />} />
<Route
path="oauth/kakao/callback"
element={<LoginCheckForKakao />}
/>
<Route path="register" element={<Register />} />
<Route
path="register/breeder-detail"
element={<RegisterBreederDetail />}
/>
<Route
path="register/adopter-detail"
element={<RegisterAdopterDetail />}
/>
<Route path="success-register" element={<SuccessRegister />} />
<Route path="/find-email" element={<FindEmail />} />
<Route path="/find-password" element={<FindPassword />} />
<Route
path="/find-email-result"
element={<FindEmailResult />}
/>
<Route path="/change-password" element={<ChangePassword />} />
<Route
path="/change-password-result"
element={<ChangePasswordResult />}
/>
<Route path="" element={<PrivateRoute />}>
<Route
path="/breeding-register"
element={<BreedingRegister />}
/>
<Route
path="/register-fillout"
element={<RegisterFillOut />}
/>
<Route
path="/breeding-complete"
element={<BreedingComplete />}
/>
<Route path="/mypage/review/:pageId" element={<ManageReview />} />
<Route
path="/mypage/review/create"
element={<CreateReview />}
></Route>

<Route
path="/mypage/review/edit/:id"
element={<EditReview />}
></Route>

<Route path="/mypage/owndogs/:pageId" element={<ManageOwnDogs />} />
<Route
path="/mypage/owndogs/edit/:id"
element={<EditOwnDogs />}
/>
</Route>
<Route path="/breeder/:id" element={<BreederDetails />} />
<Route path="/customer-details" element={<CustomerDetails />} />
<Route path="/test-description" element={<TestDesc />}></Route>
<Route path="/basic-test" element={<Test />} />
<Route path="/result" element={<Result />} />
<Route path="/answer" element={<Answer />} />
<Route path="/certify" element={<Certify />} />
<Route path="/mypage/adoptlist/adopter" element={<Adopter />} />
<Route path="/mypage/adoptlist/breeder" element={<Breeder />} />
<Route path="/mypage/modifyauth" element={<ModifyAuth />} />
<Route path="/mypage/profile" element={<Profile />} />
<Route
path="/mypage/remove-account"
element={<RemoveAccount />}
/>
</Routes>
</>
);
}
export default App;
2 changes: 1 addition & 1 deletion src/api/axiosInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ instance.interceptors.request.use(

instance.interceptors.response.use(
response => {
console.log("api ์š”์ฒญ ์‘๋‹ต :", response);
// console.log("api ์š”์ฒญ ์‘๋‹ต :", response);
return response;
},
error => {
Expand Down
6 changes: 3 additions & 3 deletions src/api/token.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const setToken = (token: string, value: string) => {
localStorage.setItem(token, value);
sessionStorage.setItem(token, value);
};
export const getToken = (token: string) => {
return localStorage.getItem(token);
return sessionStorage.getItem(token);
};
export const removeToken = (token: string) => {
localStorage.removeItem(token);
sessionStorage.removeItem(token);
};
Binary file added src/assets/images/Group28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/assets/images/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import IMG2 from "./Group21.png";
import IMG3 from "./Rectangle6.png";
import IMG4 from "./pome1.png";
import IMG5 from "./golden.png";
import IMG6 from "./Group28.png";

export { IMG1, IMG2, IMG3, IMG4, IMG5 };
export { IMG1, IMG2, IMG3, IMG4, IMG5, IMG6 };
Loading

0 comments on commit 9f0e850

Please sign in to comment.