Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: 코드 정리 #146

Open
wants to merge 172 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
2e4d0a6
테스트
May 2, 2023
eabe9b5
Merge pull request #1 from codestates-seb/jaemin
als982001 May 2, 2023
52d49b5
Header 임시
May 2, 2023
2be43cd
Merge pull request #2 from codestates-seb/jaemin
als982001 May 2, 2023
0113660
간단한 더미 데이터 생성
May 2, 2023
8fddef9
Merge pull request #4 from codestates-seb/jaemin
als982001 May 2, 2023
54a1b19
다크모드 버튼 생성(버튼의 색은 임시로)
May 2, 2023
7ad2eea
Merge pull request #6 from codestates-seb/jaemin
als982001 May 2, 2023
d5c4a08
Feat: Header 수정 및 Main화면 간단히 구현
May 2, 2023
c2434ae
Merge pull request #8 from codestates-seb/jaemin
als982001 May 2, 2023
40405ad
Feat: Redux Toolkit 추가 및 다크모드 redux 수정
May 3, 2023
271886f
Merge pull request #9 from codestates-seb/jaemin
als982001 May 3, 2023
65c2a81
Feat: theme.js 추가
May 3, 2023
b8c9986
Merge pull request #11 from codestates-seb/jaemin
als982001 May 3, 2023
c48d63a
Feat: 회원가입 기초 구현
May 3, 2023
4c384af
Merge pull request #12 from codestates-seb/jaemin
als982001 May 3, 2023
73001aa
Feat:Map구현
JS2L May 3, 2023
a1d9466
Merge branch 'fe' into feMap
als982001 May 3, 2023
6cc80a2
Merge pull request #13 from codestates-seb/feMap
als982001 May 3, 2023
0261c04
Feat: Login 추가
May 3, 2023
9d250fc
Merge pull request #14 from codestates-seb/jaemin
als982001 May 3, 2023
df67e4d
fe
wjdghksdigh May 3, 2023
b685302
feat:globalstyle,Button 추가
wjdghksdigh May 3, 2023
2aa36c9
Merge pull request #16 from codestates-seb/kjh
wjdghksdigh May 3, 2023
13f06c7
Update
JS2L May 3, 2023
d6d4920
Merge branch 'fe' of github.com:codestates-seb/seb43_main_019 into feMap
JS2L May 3, 2023
4ecc54b
feat : mypage 추가
wjdghksdigh May 4, 2023
8fa6d0c
Refactor: emotions 추가 및 emotions로 변경
May 4, 2023
78fe8d6
Merge pull request #17 from codestates-seb/jaemin
als982001 May 4, 2023
207edc6
design:수정
wjdghksdigh May 4, 2023
c426231
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 4, 2023
788e738
feat
wjdghksdigh May 4, 2023
98544cd
design:mypage 수정
wjdghksdigh May 4, 2023
1967c7b
feat : mypage 정적페이지 완성
wjdghksdigh May 4, 2023
a75d44e
Update
JS2L May 4, 2023
fb6db83
Update
JS2L May 4, 2023
e02d1e3
Merge pull request #18 from codestates-seb/kjh
wjdghksdigh May 4, 2023
5e1fed7
Update
JS2L May 4, 2023
667f00d
Refactor: Header 전면적인 수정
May 4, 2023
6f82e39
Merge pull request #19 from codestates-seb/jaemin
als982001 May 4, 2023
204472c
Update
JS2L May 4, 2023
465d589
Update
JS2L May 4, 2023
fe8f8a4
Design: 헤더 수정
May 4, 2023
1b1c5b4
Merge pull request #20 from codestates-seb/jaemin
als982001 May 4, 2023
160ee47
Design: Main 페이지의 카드 변경
May 5, 2023
901d9b5
Merge pull request #21 from codestates-seb/jaemin
als982001 May 5, 2023
c47f762
Feat: Card2 추가
May 5, 2023
6a634ab
Merge pull request #22 from codestates-seb/jaemin
als982001 May 5, 2023
0517676
Design: 회원가입 디자인 수정
May 5, 2023
2dc16df
Merge pull request #23 from codestates-seb/jaemin
als982001 May 5, 2023
864a448
Feat: 이메일 인증 과정 추가(자세한 과정은 추후 예정)
May 6, 2023
413d7b7
Merge pull request #24 from codestates-seb/jaemin
als982001 May 6, 2023
c8ebc66
Feat: 아이디/비밀번호 찾기 페이지 추가
May 6, 2023
3fb7809
Merge pull request #25 from codestates-seb/jaemin
als982001 May 6, 2023
b6f9345
Feat: 로그인/로그아웃 정보 영구 저장?
May 6, 2023
c23f24a
Merge pull request #26 from codestates-seb/jaemin
als982001 May 6, 2023
444b8c3
FE_Feat_Detail
JS2L May 7, 2023
0b96d33
FE_Feat_Detail
JS2L May 7, 2023
5a53744
Merge pull request #27 from codestates-seb/feMap
JS2L May 7, 2023
d3dc5db
fe
wjdghksdigh May 8, 2023
dbddc2e
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 8, 2023
7a64f57
Feat: Card 클릭 시 정보 표시/상세페이지 이동
May 8, 2023
b440259
Merge pull request #33 from codestates-seb/jaemin
als982001 May 8, 2023
254b6d4
Feat: Sell의 상품등록수정 디자인
May 8, 2023
797bb0e
Merge pull request #36 from codestates-seb/jaemin
als982001 May 8, 2023
b7d0bfd
feat : modal 컴포넌트 생성
wjdghksdigh May 8, 2023
6959c3a
fe: 모달 수정
wjdghksdigh May 8, 2023
d63a6cf
Feat: 임시로 로그인/로그아웃/회원가입 구현
May 8, 2023
ccf159c
Merge pull request #38 from codestates-seb/jaemin
als982001 May 8, 2023
894103e
Refactor: 테스트 로그인/로그아웃 과정 토큰으로 변경
May 9, 2023
ba2d93c
Merge pull request #39 from codestates-seb/jaemin
als982001 May 9, 2023
2d2ddde
feat: modal 정적페이지 완료
wjdghksdigh May 9, 2023
4eb9aeb
fe:merge 완료
wjdghksdigh May 9, 2023
2260041
Merge pull request #40 from codestates-seb/kjh
wjdghksdigh May 9, 2023
a806792
Feat: 카카오 로그인 구현 중. 브랜치 정리 위해 push헙니다. (#41)
als982001 May 9, 2023
b196542
design : mapage 수정 (#43)
wjdghksdigh May 10, 2023
733055a
Feat: 소셜 로그인 구현 (#53)
als982001 May 10, 2023
ff76e2c
[Fe][FEAT] 카카오페이 post 기본설정 (#56)
JS2L May 10, 2023
4dfffba
design : header 디자인 수정
wjdghksdigh May 10, 2023
5a8bce8
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 10, 2023
1a7737c
desidn : main 1차 수정
wjdghksdigh May 10, 2023
f0a89e0
design : main 1차 수정
wjdghksdigh May 10, 2023
5427156
design : main 2차 수정
wjdghksdigh May 10, 2023
292f9a2
design : dark mode 수정
wjdghksdigh May 10, 2023
06d5722
프론트엔드 회의
May 11, 2023
29e285e
프론트엔드 회의 (#59)
als982001 May 11, 2023
5368e0d
fe:merge 확인용
wjdghksdigh May 11, 2023
50b7566
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 11, 2023
1f219ff
fe:merge용
wjdghksdigh May 11, 2023
a9cf1a9
Feat: 로그인/로그아웃 테스트 위한 Test Server 추가
May 11, 2023
c061e0b
fe:merge용2
wjdghksdigh May 11, 2023
ad013c6
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 11, 2023
05f4a5c
design : 수정
wjdghksdigh May 11, 2023
981ac2b
design : detail 제외 전체 flow css 수정완료
wjdghksdigh May 11, 2023
24eab0c
Feat: 상담원과의 채팅 (#64)
als982001 May 11, 2023
557e744
Fix: OPENAI_API_KEY 수정
als982001 May 11, 2023
a980436
design: sellsideMenu 수정완료
wjdghksdigh May 12, 2023
ea445a4
Feat: Admin에서 유저관리/상품관리 틀 (#73)
als982001 May 15, 2023
e1f3992
Feat/authentication jm (#74)
als982001 May 15, 2023
616895d
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 15, 2023
c1cffb1
design : sellCRUD css 수정
wjdghksdigh May 15, 2023
be89a1c
Feat: API 명세서에 맞는 함수들 추가 (#76)
als982001 May 16, 2023
7caa667
fe : 주석제거
wjdghksdigh May 16, 2023
99aa29b
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 16, 2023
8d2e579
Feat/fix api spec (#80)
als982001 May 16, 2023
ef17c14
fe : mypage 수정
wjdghksdigh May 16, 2023
f0cc669
[FE][FEAT] 로그인이 필요한 서비스 입니다 추가 (#81)
JS2L May 16, 2023
92219a7
Merge branch 'fe' of https://github.com/codestates-seb/seb43_main_019…
wjdghksdigh May 16, 2023
e72d627
design : input 수정
wjdghksdigh May 16, 2023
3f4ee23
Feat/fix api spec (#83)
als982001 May 16, 2023
32a2a2a
Update ProductManage.jsx
als982001 May 16, 2023
d630bf4
Update Reservation.jsx
als982001 May 16, 2023
8937f18
Refactor: 로그인/회원가입 코드 수정
May 17, 2023
edecb39
Design: 프로젝트에 쓰였던 모든 Input, Button 정리
May 17, 2023
d9302b4
[FE][FEAT]Detail Axios 작업 (#86)
JS2L May 18, 2023
0324179
Feat: 채팅방 디자인 수정 및 API 명세서 적용 (#88)
als982001 May 18, 2023
eaf2faa
Feat: 리뷰 추가 (#90)
als982001 May 18, 2023
b61b3ba
Feat: 카카오 로그인 완료 (#92)
als982001 May 19, 2023
c5cbef9
feat : 검색/ 태그 검색 기능 추가 (#93)
wjdghksdigh May 19, 2023
97257d8
[FE][FEAT]위도 경도 별 지도 구현 (#94)
JS2L May 19, 2023
fdf8e44
design : mypage 수정 (#96)
wjdghksdigh May 19, 2023
e1eb98d
Feat: 배포를 위한 commit/pull request (#100)
als982001 May 19, 2023
1b2c4de
Remove: test-server 삭제
May 19, 2023
a149523
[FE][FEAT]AXIOS직전 (#102)
JS2L May 21, 2023
df97a22
Feat: 상품 CRUD (#103)
als982001 May 21, 2023
beafaa3
Update Detail.jsx
als982001 May 21, 2023
15ae1ca
Update ProductFunctions.js
als982001 May 21, 2023
0da94b0
회원가입 양식 변경, spinner 생성, main design 수정 (#104)
wjdghksdigh May 21, 2023
3aea466
Fix: 필요없는 코드 삭제 (#105)
als982001 May 21, 2023
8cfed90
toastify login 적용 (#107)
wjdghksdigh May 22, 2023
188005e
[FE][FEAT]카카오페이 axios (#108)
JS2L May 22, 2023
fef225a
Feat: member 관련 수정 (#109)
als982001 May 22, 2023
44ec0a0
main 수정 , 모바일 반응형 main, header, login, signup 수정 (#113)
wjdghksdigh May 23, 2023
b1a7d61
Feat: 수정 (#114)
als982001 May 23, 2023
768668e
[Update] (#115)
JS2L May 23, 2023
85a92b4
Update (#116)
JS2L May 23, 2023
4715fc7
Feat: 상품 등록 완료 및 admin에 미디어쿼리 적용 (#122)
als982001 May 24, 2023
b7b313c
Feat: 최종점검 전 수정 (#124)
als982001 May 24, 2023
0445054
Feat: 예약 목록 표시 및 삭제 수정
May 24, 2023
fc0540a
[FE][FEAT]axios완료, 카카오페이 완료 (#127)
JS2L May 24, 2023
80e9681
detail 수정 (#130)
wjdghksdigh May 24, 2023
0312c82
Feat: 디코에 올렸던 거 수정 및 Main 살짝 수정 (#134)
als982001 May 25, 2023
b5c24d8
Feat/detail jh 병합용 (#136)
wjdghksdigh May 25, 2023
569c884
review design 수정 (#138)
wjdghksdigh May 25, 2023
525a0d1
미디어쿼리 수정 (#139)
wjdghksdigh May 25, 2023
9776612
Feat: 백엔드 멘토링에서 나왔던 것들 수정 (#141)
als982001 May 25, 2023
abb04b6
Feat: 몇몇 기능 수정
May 26, 2023
b175ad0
Design: 채팅 높이가 이상하던 것 수정
May 26, 2023
e7d4423
Feat: 4개 수정
May 26, 2023
ff3a611
fe
wjdghksdigh May 26, 2023
24ecf0b
fe
wjdghksdigh May 26, 2023
4342b2f
Feat: 로그 누르는 것과 검색 에러 수정
May 26, 2023
7ce8088
검색 기능 수정
May 26, 2023
f4f5190
Feat:Card 이동 위한 클릭 범위 확대대
May 27, 2023
788ff54
DB_Store
May 29, 2023
1104baf
리팩토링
JS2L May 30, 2023
a7efa11
임시
May 30, 2023
bf4e478
Refactor: Components의 파일 수정
May 30, 2023
013cc0d
Rename index.js to Index.js
als982001 May 30, 2023
3d64394
Rename modeReducer.js to ModeReducer.js
als982001 May 30, 2023
2053f86
Rename userReducer.js to UserReducer.js
als982001 May 30, 2023
40f7faf
fe : 병합
wjdghksdigh May 30, 2023
f5f5901
fe : 정환 완료
wjdghksdigh May 30, 2023
9287151
Refactor: import 수정
May 30, 2023
1255a17
dlatl
May 31, 2023
00a7e62
HOTFIX: 데모데이 수정
Jun 3, 2023
166a8d3
Refactor: utils -> utilss로 변경
Jun 3, 2023
df7ac19
Refactor: utilss -> Utils로 변경
Jun 3, 2023
f91fe3a
Refactor: 잠시 수정
Jun 3, 2023
cbd9fb0
Refactor: 잠시 수정
Jun 3, 2023
2bfa9bc
Refactor: Utils 폴더 이름 변경 및 Redux 폴더 구조 변경
Jun 3, 2023
7768d77
Refactor: Redux의 Index.js 파일 위치 변경
Jun 3, 2023
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/build

# misc
.env
.DS_Store
.env.local
.env.development.local
Expand Down
Binary file added frontend/AWSCLIV2.pkg
Binary file not shown.
10,547 changes: 1,290 additions & 9,257 deletions frontend/package-lock.json

Large diffs are not rendered by default.

38 changes: 37 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,52 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.10.8",
"@emotion/styled": "^11.10.8",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-brands-svg-icons": "^6.4.0",
"@fortawesome/free-regular-svg-icons": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.4.0",
"buffer": "^6.0.3",
"date-fns": "^2.30.0",
"dotenv": "^16.0.3",
"framer-motion": "^10.12.8",
"jquery": "^3.6.4",
"jquery-ui": "^1.13.2",
"kakao-maps-sdk": "^1.0.1",
"openai": "^3.2.1",
"qs": "^6.11.1",
"react": "^18.2.0",
"react-calendar": "^4.2.1",
"react-datepicker": "^4.11.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.43.9",
"react-icons": "^4.8.0",
"react-kakao-maps": "^0.0.13",
"react-modal": "^3.16.1",
"react-query": "^3.39.3",
"react-redux": "^8.0.5",
"react-router-dom": "^6.11.0",
"react-scripts": "5.0.1",
"styled-component": "^2.8.0",
"react-scroll": "^1.8.9",
"react-spinners": "^0.13.8",
"react-toastify": "^9.1.3",
"redux": "^4.2.1",
"redux-devtools-extension": "^2.13.9",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"styled-components": "^5.3.10",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@emotion/babel-plugin": "^11.10.8"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
Expand Down
Binary file added frontend/public/img/Camp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/Camp02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/Logo_Dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/Logo_Light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/add-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/btns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/operator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/img/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link
href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500&family=Song+Myung&display=swap"
rel="stylesheet"
/>
<link rel="icon" href="./img/Camp.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -11,7 +15,17 @@
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>React App</title>
<script
type="text/javascript"
src="//dapi.kakao.com/v2/maps/sdk.js?appkey=b47a73361f8ac5e3196093123734ba42"
></script>
<script
src="https://kit.fontawesome.com/6017d9010f.js"
crossorigin="anonymous"
></script>
<script src="https://developers.kakao.com/sdk/js/kakao.js"></script>
<script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>
<title>AirCamp</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
111 changes: 110 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,114 @@
import styled from "styled-components";
import axios from "axios";

import { useDispatch, useSelector } from "react-redux";
import { useEffect, useState } from "react";
import { toast } from "react-toastify";
import { Routes, Route } from "react-router-dom";

import Header from "./Components/Global/Header";
import Main from "./Pages/Main";
import SignUp from "./Pages/SignUp";
import Login from "./Pages/Login";
import Payment from "./Pages/Payment";
import Mypage from "./Pages/Mypage";
import Detail from "./Pages/Detail";
import Sell from "./Pages/Sell";
import Admin from "./Pages/Admin";
import KakaoLogin from "./Pages/KakaoLogin";
import ChatBox from "./Components/Global/ChatBox";
import NotFound from "./Pages/NotFound";
import SelectPay from "./Pages/SelectPay";
import PaySuccessPage from "./Pages/PaySuccessPage";
import PayCancelPage from "./Pages/PayCancelPage";
import PayFailPage from "./Pages/PayFailPage";

import { handleLogout } from "./Redux/Actions";
import { getMemberInfo } from "./Tools/MemberFunctions";

// 모든 요청에 withCredentials가 true로 설정됩니다.
axios.defaults.withCredentials = true;

const Wrapper = styled.div`
width: 100vw;
height: auto;
//height: auto;
position: relative;
`;

const Container = styled.main`
width: 100%;
height: auto;
background-color: ${(props) =>
props.isDark ? "var(--black-700)" : "var(--white-50)"};
transition: all 0.5s linear;

@media screen and (min-width: 900px) {
margin-top: 100px;
}
`;

function App() {
return <div>App!</div>;
const [searchCategory, setSearchCategory] = useState("productName");
const [keyword, setKeyword] = useState("");

const isDark = useSelector((state) => state.ModeReducer);
const dispatch = useDispatch();
const userState = useSelector((state) => state.UserReducer);

useEffect(() => {
(async () => {
if (userState.login) {
const myInfo = await getMemberInfo(userState.userInfo);

if (myInfo === null) {
toast("토큰이 만료되었습니다.");
dispatch(handleLogout());
return;
}
}
})();
}, []);

return (
<Wrapper>
<Header
searchCategory={searchCategory}
setSearchCategory={setSearchCategory}
keyword={keyword}
setKeyword={setKeyword}
/>
<Container isDark={isDark}>
<Routes>
<Route path="/signup" element={<SignUp />} />
<Route path="/login" element={<Login />} />
<Route path="/mypage" element={<Mypage />} />
<Route path={"/sell/*"} element={<Sell />} />
<Route path={"/admin/*"} element={<Admin />} />
<Route path="/payment" element={<Payment />} />
<Route path={"/oauth2/*"} element={<KakaoLogin />} />
<Route path="/Pay" element={<SelectPay />} />
<Route path="/404" element={<NotFound />} />
<Route path="/api/payments/success" element={<PaySuccessPage />} />
<Route path="/api/payments/cancel" element={<PayCancelPage />} />
<Route path="/api/payments/fail" element={<PayFailPage />} />
<Route path="/:id" element={<Detail />} />
<Route
path="/"
element={
<Main
searchCategory={searchCategory}
setSearchCategory={setSearchCategory}
keyword={keyword}
setKeyword={setKeyword}
/>
}
/>
</Routes>
</Container>
<ChatBox />
</Wrapper>
);
}

export default App;
104 changes: 104 additions & 0 deletions frontend/src/Components/Admin/AdminProductCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import styled from "@emotion/styled";
import { useState } from "react";
import { useSelector } from "react-redux";
import AdminProductModal from "./AdminProductModal";

const Container = styled.div`
background-color: transparent;
width: 250px;
height: 350px;
perspective: 1000px;
border-radius: 10px;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
transition: border-radius 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
`;

const Inner = styled.div`
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.6s;
transform-style: preserve-3d;
`;

const Front = styled.div`
position: absolute;
width: 100%;
height: 100%;
border-radius: 2em;
backface-visibility: hidden;
background-color: ${(props) =>
props.isDark ? "var(--white-50)" : "var(--white)"};
color: var(--black-700);
border: none;
display: flex;
flex-direction: column;
align-items: center;
`;

const Img = styled.div`
display: flex;
align-items: center;
border: none;
border-radius: 30px;
width: 100%;
height: 200px;
background-image: url(${(props) => props.bgphoto});
background-size: cover;
background-position: center;
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
`;

const Infos = styled.div`
width: 100%;
height: 150px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
`;

const Info = styled.h5`
font-size: 15px;
margin: 0;
`;

export default function AdminProductCard({ campground }) {
const isDark = useSelector((state) => state.ModeReducer);
const [openModal, setOpenModal] = useState(false);
const [seller, setSeller] = useState("");
const [isSellerLoading, setIsSellerLoading] = useState(false);

const handleOpenModal = () => {
setOpenModal((prev) => true);
};

const handleCloseModal = () => {
setOpenModal((prev) => false);
};

return (
<>
<Container onClick={handleOpenModal}>
<Inner className="inner">
<Front isDark={isDark}>
<Img bgphoto={campground.imageUrl} />
<Infos>
<Info>{`이름: ${campground.productName}`}</Info>
<Info>{`위치: ${campground.location}`}</Info>
<Info>{`가격: ${campground.productPrice}`}</Info>
</Infos>
</Front>
</Inner>
</Container>
<AdminProductModal
isOpen={openModal}
closeModal={handleCloseModal}
campground={campground}
/>
</>
);
}
Loading