diff --git a/components/hooks/usePopupData.ts b/components/hooks/usePopupData.ts index cc279e1..9587232 100644 --- a/components/hooks/usePopupData.ts +++ b/components/hooks/usePopupData.ts @@ -1,8 +1,6 @@ import { getPopups } from "@/pages/api/popup"; import { useEffect, useState } from "react"; - - interface Popup { title: string; content: string; @@ -12,17 +10,13 @@ interface Popup { } export const usePopupData = () => { - const [popups, setPopups] = useState([]); // api 호출해서 초기화 useEffect(() => { const fetchData = async () => { const data = await getPopups(0); - console.log(data); - data && setPopups(data.content); - }; fetchData(); @@ -30,4 +24,3 @@ export const usePopupData = () => { return { popups }; }; - diff --git a/components/hooks/useStores.ts b/components/hooks/useStores.ts index aac139b..c6085aa 100644 --- a/components/hooks/useStores.ts +++ b/components/hooks/useStores.ts @@ -29,7 +29,6 @@ export const useStores = async ({ }); setData(result.coupons); - console.log(result.coupons); }; fetchData(); diff --git a/components/organisms/Header.tsx b/components/organisms/Header.tsx index d9c9a4b..536c1ea 100644 --- a/components/organisms/Header.tsx +++ b/components/organisms/Header.tsx @@ -32,15 +32,8 @@ const Header = () => { setUserSessionData(window.sessionStorage?.getItem("userSession")); }, []); - useEffect(() => { - console.table(`USER SESSION DATA : ${userSessionData}`); - }, [userSessionData]); - const logoutHandler = async () => { - console.log("logout합니다"); const result = await Logout(); - console.log(result); - setLogData({ logined: false, email: "", diff --git "a/components/organisms/Modal/\bSearchModal.tsx" "b/components/organisms/Modal/\bSearchModal.tsx" index 41381dc..99b50f8 100644 --- "a/components/organisms/Modal/\bSearchModal.tsx" +++ "b/components/organisms/Modal/\bSearchModal.tsx" @@ -46,7 +46,6 @@ const SearchModal = ({ setIsSearchOpen }: SMProps) => { baseData.then((res) => { if (res !== null) { setData(res.stores); - console.log("res", res.stores); } }); }, []); @@ -70,7 +69,6 @@ const SearchModal = ({ setIsSearchOpen }: SMProps) => { filterData.then((res) => { if (res !== null) { setData(res.stores || []); - console.log("operateF", res.stores); } }); }, [operateFilter]); diff --git a/pages/api/StoreAPI.ts b/pages/api/StoreAPI.ts index 8c74469..75648af 100644 --- a/pages/api/StoreAPI.ts +++ b/pages/api/StoreAPI.ts @@ -3,7 +3,6 @@ import axios from "axios"; export const getStoreBase = async () => { try { - const response = await axiosInstance().get(`/store/search?pageSize=40`); return response.data; @@ -29,9 +28,7 @@ export const getStoreWithFilter = async ({ pageNumber = 0, }: FilterProps) => { try { - const response = await axiosInstance().get( - `/store/search?isPicked=${isPicked}${"&name=" + name}${ "&category=" + category }&pageSize=40${"&pageNumber=" + pageNumber}` @@ -47,9 +44,7 @@ export const getStoreWithFilter = async ({ export const postPickStore = async (storeId: number) => { try { - const response = await axiosInstance().post(`/store/pick`, { - storeId: storeId, }); return response.data; @@ -63,9 +58,7 @@ export const postPickStore = async (storeId: number) => { export const deletePickStore = async (storeId: number) => { try { - const response = await axiosInstance().delete(`/store/pick`, { - data: { storeId: storeId }, }); return response.data; @@ -79,7 +72,6 @@ export const deletePickStore = async (storeId: number) => { export const getStoreInfo = async (storeId: number) => { try { - const response = await axiosInstance().get(`/store/details/${storeId}`); return response.data; diff --git a/pages/api/axiosInstance.ts b/pages/api/axiosInstance.ts index d0631d1..5053537 100644 --- a/pages/api/axiosInstance.ts +++ b/pages/api/axiosInstance.ts @@ -1,20 +1,16 @@ import axios from "axios"; - export const axiosInstance = () => { const userSession = sessionStorage.getItem("userSession"); let token: string = ""; if (userSession) { - console.log("usersession 있음"); const parsedSession = JSON.parse(userSession); token = parsedSession.user?.token || ""; } else { console.log("유저세션 없음"); } - console.log(token); - return axios.create({ baseURL: process.env.NEXT_PUBLIC_API_URL, headers: { @@ -23,4 +19,3 @@ export const axiosInstance = () => { }, }); }; - diff --git a/pages/api/login.ts b/pages/api/login.ts index 69a0a61..d26ec28 100644 --- a/pages/api/login.ts +++ b/pages/api/login.ts @@ -29,7 +29,6 @@ export const login = async ({ email, password }: LoginProps) => { ); const accessToken = response.headers.authorization; - console.log("로그인 성공:", accessToken); return { data: response.data, accessToken }; } catch (error) { @@ -90,8 +89,6 @@ export const CreateImage = async (file: File) => { // 로그아웃 export const Logout = async () => { - - try { const url = `${process.env.NEXT_PUBLIC_API_URL}${process.env.NEXT_PUBLIC_LOGOUT_ENDPOINT}`; const response = await axiosInstance().post(url); @@ -100,4 +97,3 @@ export const Logout = async () => { console.error(`Error 코드 : ${e}`); } }; - diff --git a/pages/contact/index.tsx b/pages/contact/index.tsx index a4b462b..557115a 100644 --- a/pages/contact/index.tsx +++ b/pages/contact/index.tsx @@ -47,7 +47,6 @@ export default function Contact() { }); baseData.then((res) => { setData(res?.contractedStores); - console.log(res?.contractedStores); }); }, []); @@ -70,7 +69,6 @@ export default function Contact() { filterData.then((res) => { if (res !== null) { setData(res.contractedStores); - console.log("operateF", res.contractedStores); } }); }, [operateFilter]); diff --git a/pages/contact/store/[id].tsx b/pages/contact/store/[id].tsx index a208096..ae67090 100644 --- a/pages/contact/store/[id].tsx +++ b/pages/contact/store/[id].tsx @@ -43,8 +43,6 @@ const ContactStore = () => { const router = useRouter(); const { id } = router.query; - console.log("id", id); - const [isStampModal, setIsStampModal] = useState(false); const [isFinishModal, setIsFinishModal] = useState(false); const handleOnClickStamp = () => { @@ -64,7 +62,6 @@ const ContactStore = () => { const info = getContractInfo(Number(id)); info.then((res) => { setData(res); - console.log("info", res); }); }, [id]); const eng = ["FOOD", "CAFE", "CULTURE", "BEAUTY", "ETC"]; diff --git a/pages/search/index.tsx b/pages/search/index.tsx index df795d9..b989fe2 100644 --- a/pages/search/index.tsx +++ b/pages/search/index.tsx @@ -49,7 +49,6 @@ export default function SearchHome() { baseData.then((res) => { if (res !== null) { setData(res.stores); - console.log("res", res.stores); } }); }, []); @@ -73,7 +72,6 @@ export default function SearchHome() { filterData.then((res) => { if (res !== null) { setData(res.stores || []); - console.log("operateF", res.stores); } }); }, [operateFilter]); diff --git a/pages/student/coupon/register/Inputs.tsx b/pages/student/coupon/register/Inputs.tsx index 77cc895..e6260d4 100644 --- a/pages/student/coupon/register/Inputs.tsx +++ b/pages/student/coupon/register/Inputs.tsx @@ -1,10 +1,8 @@ - import React, { useEffect, useMemo, useState } from "react"; import * as styles from "../../../../components/styles/CInputs.style"; import { css } from "@emotion/css"; import { Checkbox, - Dialog, FilledInput, IconButton, @@ -12,19 +10,16 @@ import { List, ListItem, ListItemText, - } from "@mui/material"; import SearchTwoToneIcon from "@mui/icons-material/SearchTwoTone"; import { createCoupon } from "@/pages/api/coupon"; import CheckCircleIcon from "@mui/icons-material/CheckCircle"; import CircleIcon from "@mui/icons-material/Circle"; - import { getFoods } from "@/pages/api/others"; import { useCouponData } from "@/components/hooks/useCouponData"; import { useStores } from "@/components/hooks/useStores"; - interface EventProps { storeId: number; type: "COUPON"; @@ -46,8 +41,7 @@ const Inputs = (props: any) => { ], [] ); - - + const [stores, setStores] = useState([]); const [searchTerm, setSearchTerm] = useState(""); @@ -55,12 +49,6 @@ const Inputs = (props: any) => { setFormData({ ...formData, storeId: store.storeId }); }; - useEffect(() => { - console.log(formData); - }, []); - - console.log(stores); - const [formData, setFormData] = useState({ storeId: 2, type: "COUPON", @@ -81,10 +69,6 @@ const Inputs = (props: any) => { postData(); }; - useEffect(() => { - console.log(formData); - }, [formData]); - const postData = async () => { const result = await createCoupon({ name: formData.name, @@ -94,8 +78,6 @@ const Inputs = (props: any) => { type: "COUPON", conditions: formData.conditions, }); - - console.log(result); }; return ( @@ -132,11 +114,9 @@ const Inputs = (props: any) => { className={css` width: 50%; `} - onChange={(e) => { setSearchTerm(e.target.value); }} - placeholder={placeHolders[1]} endAdornment={ @@ -166,12 +146,8 @@ const Inputs = (props: any) => { placeholder={placeHolders[3]} name="condition" onChange={(e) => { - let result: any = []; - - result.push(e.target.value); - setFormData((prev) => ({ ...prev, conditions: result })); }} /> diff --git a/pages/student/coupon/register/index.tsx b/pages/student/coupon/register/index.tsx index 68b3be0..23eb3c5 100644 --- a/pages/student/coupon/register/index.tsx +++ b/pages/student/coupon/register/index.tsx @@ -15,8 +15,6 @@ const CouponRegisterPage: React.FC = () => { conditions: ["쿠폰 사용조건"], name: "쿠폰 정보", }); - - console.log(couponContent); const handleOpen = () => { setModalOpen(true); }; diff --git a/pages/student/popup/index.tsx b/pages/student/popup/index.tsx index 144ab12..dc74952 100644 --- a/pages/student/popup/index.tsx +++ b/pages/student/popup/index.tsx @@ -1,5 +1,3 @@ - - import { useRouter } from "next/router"; import React from "react"; import * as styles from "@/components/styles/popup/style"; @@ -10,13 +8,11 @@ import EmptyComponent from "@/components/atoms/EmptyComponent"; import { usePopupData } from "@/components/hooks/usePopupData"; import { Checkbox } from "@mui/material"; - const PopupAdminPage: React.FC = () => { const router = useRouter(); const { popups } = usePopupData(); - console.log(popups); return ( @@ -42,11 +38,7 @@ const PopupAdminPage: React.FC = () => { {element.content} - - {element.content}/{element.reservation} - - @@ -84,7 +76,6 @@ const PopupAdminPage: React.FC = () => { 삭제하기 - ); }; diff --git a/pages/student/popup/register/Inputs.tsx b/pages/student/popup/register/Inputs.tsx index f6bc459..8577fd9 100644 --- a/pages/student/popup/register/Inputs.tsx +++ b/pages/student/popup/register/Inputs.tsx @@ -54,13 +54,8 @@ const Inputs: React.FC = () => { endDate: formData.endDate, storeId: formData.storeId, }); - console.log(result); }; - useEffect(() => { - console.log(JSON.stringify(formData)); - }, [formData]); - return (
@@ -173,7 +168,6 @@ const Inputs: React.FC = () => { label="선택해주세요" onChange={(newValue: any) => { let date = `${newValue.$y}-${newValue.$M}-${newValue.$D} ${newValue.$H}:${newValue.$m}`; - console.log(date); setFormData((prev) => ({ ...prev, reservation: date, diff --git a/pages/user/auth/index.tsx b/pages/user/auth/index.tsx index 68c10f2..d05e995 100644 --- a/pages/user/auth/index.tsx +++ b/pages/user/auth/index.tsx @@ -22,7 +22,6 @@ const AuthPage: React.FC = () => { // input file changes const handleFileInput = (e: any) => { const file = e.target.files[0]; - console.log(file); setProofImage(file); }; @@ -54,8 +53,6 @@ const AuthPage: React.FC = () => { typeName: "총총", proofImageUrl: "", }); - - console.log(signUpResult); } catch (error) { console.error("회원가입 오류 : ", error); } diff --git a/pages/user/form/index.tsx b/pages/user/form/index.tsx index b5756a9..27d65bb 100644 --- a/pages/user/form/index.tsx +++ b/pages/user/form/index.tsx @@ -67,9 +67,6 @@ const FormPage: React.FC = () => { [name]: value, })); }; - useEffect(() => { - console.log(JSON.stringify(formData)); - }, [formData]); return ( @@ -110,7 +107,6 @@ const FormPage: React.FC = () => { - = () => { onChange={checkBoxInputHandler} /> - - = () => { onChange={checkBoxInputHandler} /> - = () => { export default FormPage; - const Label = styled.p` font-size: 1rem; font-weight: 500; width: 9rem; `; -