Skip to content

Commit 1f19f46

Browse files
authored
Merge pull request #312 from hhbb0081/test
Docs: 적립금 주석 처리
2 parents 0b59a54 + b26101c commit 1f19f46

File tree

10 files changed

+11
-90
lines changed

10 files changed

+11
-90
lines changed

src/App.js

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ import PaymentPage from "./pages/PaymentPage/PaymentPage";
3030
import PaymentFailPage from "./pages/PaymentPage/Redirect/PaymentFailPage";
3131
import PaymentLoadingPage from "./pages/PaymentPage/Redirect/PaymentLoadingPage";
3232
import Splash from "./pages/Splash/Splash";
33-
import StoreSearchPage from "./pages/StoreSearch/StoreSearch";
3433
import FestivalBoothSearch from "./pages/StoreSearch/FestivalBoothSearch";
34+
import StoreSearchPage from "./pages/StoreSearch/StoreSearch";
3535
function App() {
3636
// const [cookies, , removeCookies] = useCookies();
3737
// const [isAuth, setIsAuth] = useRecoilState(isAuthenticatedState);
@@ -60,50 +60,6 @@ function App() {
6060
const NewFestivalBoothSearch = Auth(FestivalBoothSearch, true, 2);
6161
// const NewPackagingStatusPage = Auth(PackagingStatusPage, true);
6262

63-
// const minute = 1000 * 60 * 60 * 24; // 24시간
64-
//const minute = 1000 * 60 * 10; // 10분
65-
// const minute = 1000 * 10; // 10초
66-
// // 주기적으로 실행되는 함수
67-
// useInterval(() => {
68-
// const token = localStorage.getItem("accessToken");
69-
// console.log('local token: ', token);
70-
// console.log('isAuth: ', isAuth);
71-
// // 리프레시 토큰이 존재하고, 비어 있지 않은 경우
72-
// if (token) {
73-
// // http 요청에 사용될 헤더 설정과 함께 서버에 토큰 갱신 요청
74-
// let config = {
75-
// withCredentials: true,
76-
// headers: {
77-
// Authorization: `Bearer ${token ? token : cookies?.accessToken}`
78-
// }
79-
// };
80-
// console.log('AT 재발급');
81-
// axios
82-
// .get(apiUrl, config)
83-
// .then((response) => {
84-
// console.log(response);
85-
// // 현재 쿠키 삭제
86-
// if (response.status !== 200 ) {
87-
// message.info("다시 로그인해주세요.");
88-
// removeCookies();
89-
// localStorage.clear();
90-
// setIsAuth(false);
91-
// navigate("/login");
92-
// } else {
93-
// console.log("AT 재발급 성공! ");
94-
// console.log(cookies);
95-
// debugger;
96-
// cookies?.accessToken && localStorage.setItem("accessToken", cookies?.accessToken); // 로컬 스토리지에 AT 저장
97-
// removeCookies("accessToken"); // AT 쿠키 삭제
98-
// }
99-
// })
100-
// .catch((error) => {
101-
// console.error(error);
102-
// message.info("다시 로그인해주세요.");
103-
// navigate("/login");
104-
// });
105-
// }
106-
// }, minute - 1000); // 24시간 주기에서 1분을 뺀 주기로 주기적 실행
10763

10864
return (
10965
<div className="App">

src/components/views/PageComponent/OrderProgress.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const OrderProgress = () => {
1616
const [degree, setDegree] = useState(-1);
1717
const [isOpen, setIsOpen] = useState(false);
1818
const [refreshKey, setRefreshKey] = useState(0);
19-
const { estimatedTime, orderNum, progress, expectPoint } =
20-
useFetchCurrentOrder(orderId, refreshKey);
19+
const { estimatedTime, orderNum, progress } =
20+
useFetchCurrentOrder(orderId, refreshKey); // expectPoint 일시 삭제
2121
const cancelOrder = useCancelOrder();
2222
const [rotate, setRotate] = useState(false); //새로고침 클릭시 회전용
2323
const [debounceTimeout, setDebounceTimeout] = useState(null); // 디바운싱 상태
@@ -234,13 +234,13 @@ const OrderProgress = () => {
234234
</div>
235235
)}
236236

237-
{degree === 3 ? (
237+
{/* {degree === 3 ? (
238238
<div className="order_progress__point">
239239
<span className="order_progress__point_text">
240240
<span>{expectPoint}</span>원 적립되었습니다
241241
</span>
242242
</div>
243-
) : null}
243+
) : null} */}
244244
</div>
245245

246246
{isOpen && (

src/hoc/auth.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,21 @@ function Auth(SpecificComponent, option, adminRoute = null) {
2222
Authorization: `Bearer ${token ? token : cookies?.accessToken}`
2323
}
2424
}).then((response) => {
25-
console.log(response);
2625
// debugger;
2726
const { auth } = response.data; // 로그인 여부
2827
const { role } = response.data; // GUEST, USER, CEO
2928
console.log(auth, role, option);
30-
console.log(cookies);
3129
if (cookies.accessToken) {
3230
if(!token && auth) {
3331
// 로그인 후 첫 접속
3432
localStorage.setItem("accessToken", cookies.accessToken); // 로컬 스토리지에 AT 저장
35-
// localStorage.setItem("expiredTime", moment().add(1, "days").format("yyyy-MM-DD HH:mm:ss")); // 만료시간 저장
3633
setIsAuth(true); // 로그인 여부 변경
3734
message.success("로그인에 성공하셨습니다.");
3835
removeCookie("accessToken"); // AT 쿠키 삭제
3936
return;
4037
} else if(token) {
4138
localStorage.clear();
4239
localStorage.setItem("accessToken", cookies.accessToken); // 로컬 스토리지에 AT 저장
43-
// localStorage.setItem("expiredTime", moment().add(1, "days").format("yyyy-MM-DD HH:mm:ss")); // 만료시간 저장
4440
setIsAuth(true); // 로그인 여부 변경
4541
removeCookie("accessToken"); // AT 쿠키 삭제
4642
return;
@@ -57,7 +53,6 @@ function Auth(SpecificComponent, option, adminRoute = null) {
5753
removeCookie("accessToken");
5854
}
5955
if(option && location.pathname !== '/' && location.pathname !== '/booth' && location.pathname.split("?")[0] !== '/store'){
60-
console.log("부스 & 홈 & 상세에서 나오지 마라");
6156
navigate('/login');
6257
return;
6358
}

src/hooks/useFetchFoodOptionInfo.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const useFetchFoodOptionInfo = (storeId, foodieId, inout) => {
1717
setImgUrl(response.data?.imgUrl);
1818
setName(response.data?.name);
1919
setPrice(response.data?.price);
20-
console.log("메뉴 데이터: ", response.data);
2120
} catch (error) {
2221
console.error("Error fetching food option info:", error);
2322
}

src/hooks/useFetchOrderDetails.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const useFetchOrderDetails = (orderId) => {
3737
setSalePrice(response.data.salePrice);
3838
setStoreName(response.data.storeName);
3939
setStorePhone(response.data.storePhone);
40-
console.log('order detail: ', response.data);
4140
} catch (error) {
4241
console.error("Error fetching order details:", error);
4342
}

src/hooks/useFetchQuickOrder.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const useFetchQuickOrder = () => {
2424
}
2525
} else {
2626
// isAuth가 false일 때 quickOrder 상태를 초기화합니다.
27-
console.log('fetching quick order is diabled');
2827
setQuickOrder([]);
2928
}
3029
};

src/hooks/useLogout.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const useLogout = (removeCookie, setIsAuth) => {
1515
}
1616
});
1717
if(response.status === 200){
18-
console.log(response);
1918
localStorage.clear();
2019
setIsAuth(false);
2120
message.success("로그아웃에 성공하셨습니다.");

src/pages/OrderProcessPage/OrderProcessPage.jsx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ const OrderProcessPage = () => {
130130
return texts;
131131
});
132132

133-
console.log('totalAmount: ', totalAmount - prevRadioPrice[index] + price);
134133
setTotalAmount((prevAmount) => prevAmount - prevRadioPrice[index] + price);
135134

136135
setPrevRadioPrice((prevPrices) => {
@@ -148,10 +147,6 @@ const OrderProcessPage = () => {
148147

149148
// 선택 옵션 변경
150149
const handleOptionChange = (idx, price, e) => {
151-
const tmpOptionIdx = [...optionIdx, idx];
152-
e.target.checked && console.log('옵션 변경 후 totalAmount: ', totalAmount + price, '옵션 변경 후 idx: ', tmpOptionIdx);
153-
!e.target.checked && console.log('옵션 변경 후 totalAmount: ', totalAmount - price, '옵션 변경 후 idx: ', optionIdx.filter((e) => e !== idx));
154-
155150
e.target.checked
156151
? setTotalAmount((prevAmount) => prevAmount + price)
157152
: setTotalAmount((prevAmount) => prevAmount - price);
@@ -163,14 +158,12 @@ const OrderProcessPage = () => {
163158
// 수량 증가
164159
const handleCntUp = () => {
165160
const newOrderCnt = orderCnt + 1;
166-
console.log('count: ', newOrderCnt);
167161
setOrderCnt(newOrderCnt);
168162
};
169163

170164
// 수량 감소
171165
const handleCntDown = () => {
172166
const newOrderCnt = orderCnt === 1 ? 1 : orderCnt - 1;
173-
console.log('count: ', newOrderCnt);
174167
setOrderCnt((prev) => (prev === 1 ? 1 : newOrderCnt));
175168
};
176169

@@ -180,26 +173,9 @@ const OrderProcessPage = () => {
180173
.filter((el) => el?.essential)
181174
.map((e) => e.options[0]?.name);
182175

183-
console.log('essentialOptions: ', essentialOptions);
184176
setSelectedRadioTexts(essentialOptions);
185177
}
186178

187-
console.log('orderCount: ', orderCnt)
188-
console.log('price: ', price);
189-
console.log('category: ', parseInt(
190-
category
191-
?.filter((el) => el?.essential)
192-
.map((e) => parseInt(e?.options[0]?.price))
193-
.reduce((prev, curr) => prev + curr, 0)));
194-
console.log('totalPrice: ',
195-
(price +
196-
parseInt(
197-
category
198-
?.filter((el) => el?.essential)
199-
.map((e) => parseInt(e?.options[0]?.price))
200-
.reduce((prev, curr) => prev + curr, 0)
201-
)));
202-
203179
setTotalAmount(
204180
price &&
205181
price +

src/pages/StoreSearch/FestivalBoothSearch.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { useState, useEffect, useRef } from "react";
2-
import { IMAGES } from "../../constants/images";
3-
import "./StoreSearch.css";
1+
import React, { useEffect, useRef, useState } from "react";
42
import Header from "../../components/views/Header/Header";
53
import NavBar from "../../components/views/NavBar/NavBar";
64
import StoreList from "../../components/views/StoreList/StoreList";
5+
import { IMAGES } from "../../constants/images";
6+
import "./StoreSearch.css";
77

88
function FestivalBoothSearch() {
99
const [searchTerm, setSearchTerm] = useState("");
@@ -21,7 +21,6 @@ function FestivalBoothSearch() {
2121
useEffect(() => {
2222
const handler = setTimeout(() => {
2323
setDebouncedSearchTerm(searchTerm);
24-
console.log("디바운싱:", searchTerm);
2524
}, debounceDelay);
2625

2726
// 컴포넌트가 unmount되거나 다음 useEffect가 실행되기 전에 타이머를 정리

src/pages/StoreSearch/StoreSearch.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, { useState, useEffect, useRef } from "react";
2-
import { IMAGES } from "../../constants/images";
3-
import "./StoreSearch.css";
1+
import React, { useEffect, useRef, useState } from "react";
42
import Header from "../../components/views/Header/Header";
53
import NavBar from "../../components/views/NavBar/NavBar";
64
import StoreList from "../../components/views/StoreList/StoreList";
5+
import { IMAGES } from "../../constants/images";
6+
import "./StoreSearch.css";
77

88
function StoreSearch() {
99
const [searchTerm, setSearchTerm] = useState("");
@@ -21,7 +21,6 @@ function StoreSearch() {
2121
useEffect(() => {
2222
const handler = setTimeout(() => {
2323
setDebouncedSearchTerm(searchTerm);
24-
console.log("디바운싱:", searchTerm);
2524
}, debounceDelay);
2625

2726
// 컴포넌트가 unmount되거나 다음 useEffect가 실행되기 전에 타이머를 정리

0 commit comments

Comments
 (0)