diff --git a/src/api/auth/auth.ts b/src/api/auth/auth.ts index 111f84c2..82a81922 100644 --- a/src/api/auth/auth.ts +++ b/src/api/auth/auth.ts @@ -8,7 +8,7 @@ export const requestIdtoken = async ( provider: string | undefined, ) => { return await axiosInstance - .get(`/api/v1/auth/${provider}/idtoken?code=${authorizationCode}`) + .get(`/api/v1/auth/${provider}/idToken/local?code=${authorizationCode}`) .then(response => { localStorage.setItem('idtoken', response.data.data.idToken); return response.data.data.idToken; diff --git a/src/components/application/ApplicationForm.tsx b/src/components/application/ApplicationForm.tsx index caad5555..6744e050 100644 --- a/src/components/application/ApplicationForm.tsx +++ b/src/components/application/ApplicationForm.tsx @@ -190,6 +190,10 @@ const ApplicationForm = () => { if (hackathonResponse.data.length === 0) { setIsSuccess(false); } else { + setValue( + 'hackathonParts', + hackathonResponse.data.data.hackathonParts, + ); setIsSuccess(true); } } catch (error) { diff --git a/src/components/application/ApplicationModify.tsx b/src/components/application/ApplicationModify.tsx index bd029567..4ed17128 100644 --- a/src/components/application/ApplicationModify.tsx +++ b/src/components/application/ApplicationModify.tsx @@ -74,10 +74,11 @@ const ApplicationForm = () => { const fetchData = async () => { try { - const response = await request({ + const response = await request({ uri: `/api/v1/hackathons/${hackathonId}`, method: 'get', }); + setHackathonData(response.data); } catch (error) { console.error('Error fetching data:', error); @@ -138,7 +139,6 @@ const ApplicationForm = () => { }; const handleCancelOption = (option: string) => { - console.log(option); const newValue = selectedParts.filter(selected => selected !== option); setValue('hackathonParts', newValue.length > 0 ? newValue : []); }; @@ -175,8 +175,10 @@ const ApplicationForm = () => { } if (hackathonData?.hackathonParts) { let arr = []; + for (let i = 0; i < hackathonData.hackathonParts.length; i++) { arr.push(hackathonData.hackathonParts[i]); + setValue('hackathonParts', arr); } } @@ -203,9 +205,8 @@ const ApplicationForm = () => { console.error('서버 요청 오류:', error); } }; - console.log('수정'); + const onSubmit = (data: ApplicationFormType) => { - console.log(data); let datas = { phone: data.phone, hackathonParts: data.hackathonParts, @@ -213,7 +214,7 @@ const ApplicationForm = () => { offlineParticipation: data.offlineParticipation, reasonForNotOffline: data.reasonForNotOffline, }; - console.log(data); + setHackathonData(datas); setIsModalOpen(true); }; diff --git a/src/components/application/Dropdown.tsx b/src/components/application/Dropdown.tsx index dda6895e..69f1ad63 100644 --- a/src/components/application/Dropdown.tsx +++ b/src/components/application/Dropdown.tsx @@ -46,7 +46,7 @@ const Dropdown = ({ {trackOption.map(track => ( { const fieldValue = field.value as string[]; @@ -108,7 +108,7 @@ const Dropdown = ({ {trackOption.map(track => ( { const fieldValue = field.value as string[]; diff --git a/src/components/utils/ImageUpload.ts b/src/components/utils/ImageUpload.ts index 36e8e76a..e536e971 100644 --- a/src/components/utils/ImageUpload.ts +++ b/src/components/utils/ImageUpload.ts @@ -39,7 +39,6 @@ class ImageUpload { static async enrollImagesToS3(file: File, presignedUrl: string) { const response = await axios.put(presignedUrl, file); if (response.status !== 200) { - console.log('S3 오류'); return; } } diff --git a/src/pages/admin/components/modal/hackathonModal.tsx b/src/pages/admin/components/modal/hackathonModal.tsx index 049d01da..8fd9a11b 100644 --- a/src/pages/admin/components/modal/hackathonModal.tsx +++ b/src/pages/admin/components/modal/hackathonModal.tsx @@ -7,7 +7,6 @@ interface HackathonModalProps { } function HackathonModal({ onCancel, reason }: HackathonModalProps) { - console.log(reason); return ( <> diff --git a/src/pages/chat/components/ChatList.tsx b/src/pages/chat/components/ChatList.tsx index 159bcf62..9e89d631 100644 --- a/src/pages/chat/components/ChatList.tsx +++ b/src/pages/chat/components/ChatList.tsx @@ -15,9 +15,7 @@ const ChatList = () => { } // 비동기 처리 - useEffect(() => { - console.log(activeUserName); - }, [activeUserName]); + useEffect(() => {}, [activeUserName]); return ( diff --git a/src/pages/chat/components/Input.tsx b/src/pages/chat/components/Input.tsx index e803133f..099b156b 100644 --- a/src/pages/chat/components/Input.tsx +++ b/src/pages/chat/components/Input.tsx @@ -14,7 +14,6 @@ const Input = () => { const openImageModal = (e: React.MouseEvent) => { e.preventDefault(); setIsImgClick(!isImgClick); - console.log('Send image?'); }; const onInputChange = (e: React.ChangeEvent) => { diff --git a/src/pages/mypage/components/UserInfoModify.tsx b/src/pages/mypage/components/UserInfoModify.tsx index a183ec92..d9c004fc 100644 --- a/src/pages/mypage/components/UserInfoModify.tsx +++ b/src/pages/mypage/components/UserInfoModify.tsx @@ -65,7 +65,6 @@ const UserInfoModify = () => { let label: string; if (field === 'part') { label = findLabelByValue(selectedOption.value); - console.log(label); } setFormState(prev => ({ ...prev, diff --git a/src/pages/recruit/components/FooterModal.tsx b/src/pages/recruit/components/FooterModal.tsx index 2b6318d2..96d765ed 100644 --- a/src/pages/recruit/components/FooterModal.tsx +++ b/src/pages/recruit/components/FooterModal.tsx @@ -106,7 +106,6 @@ const FooterModal = ({ isOpen, closeModal }: FooterModalProps) => { { email: email }, ); - console.log(response.data); setSuccess(response.data.isSuccess); } catch (error) { console.error('Error submitting form:', error); diff --git a/src/pages/univRecruit/UnivModalMobile.tsx b/src/pages/univRecruit/UnivModalMobile.tsx index dc939ab0..e5e1afab 100644 --- a/src/pages/univRecruit/UnivModalMobile.tsx +++ b/src/pages/univRecruit/UnivModalMobile.tsx @@ -66,7 +66,6 @@ const UnivModalMobile = ({ isOpen, closeModal }: FooterModalProps) => { { email: email }, ); - console.log(response.data); setSuccess(response.data.isSuccess); } catch (error) { console.error('Error submitting form:', error); diff --git a/src/query/get/useServerSidePagination.tsx b/src/query/get/useServerSidePagination.tsx index b42bd9b4..35ed64a2 100644 --- a/src/query/get/useServerSidePagination.tsx +++ b/src/query/get/useServerSidePagination.tsx @@ -70,7 +70,6 @@ function useServerSidePagination({ const [totalElements, setTotalElements] = useState(0); const [pageInfo, setPageInfo] = useSearchParams(); - console.log(typeof pageInfo.get('page')); // (if) 페이지 정보가 없을 때 pageInfo를 채워넣음 // (else if) page=1 이 아니면서 검색을 했을때 page=1, currentPage=1 로 변경 useEffect(() => { @@ -79,7 +78,6 @@ function useServerSidePagination({ setPageInfo(pageInfo); setCurrentPage(1); } else if (pageInfo.get('page') !== '1' && (search || univName)) { - console.log('안되나'); pageInfo.set('page', '1'); setPageInfo(pageInfo); setCurrentPage(1);