From 89d647c6cdc20fc5adb2ef754b9d67642b36e0ba Mon Sep 17 00:00:00 2001 From: kmin-jeong Date: Sat, 11 May 2024 08:32:07 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:console.log=20//=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/adminSelection/companySelection.tsx | 8 ++++---- src/components/ui/adminSelection/memberSelection.tsx | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/ui/adminSelection/companySelection.tsx b/src/components/ui/adminSelection/companySelection.tsx index 916b2356..6adbc48d 100644 --- a/src/components/ui/adminSelection/companySelection.tsx +++ b/src/components/ui/adminSelection/companySelection.tsx @@ -99,13 +99,13 @@ export default function CompanySelection() { }) .then((response) => response.json()) .then((data: ApiResponse) => { - console.log(data); + // console.log(data); setCompanies(data.data.companies); setTotalPages(data.data.totalPages); seTtotalCompanyCount(data.data.totalElements); }) .catch((error) => { - console.error('Error:', error); + // console.error('Error:', error); setIsLoading(false); }); @@ -118,12 +118,12 @@ export default function CompanySelection() { }) .then((response) => response.json()) .then((data: ApiResponse) => { - console.log(data); + // console.log(data); setCompanies(data.data.companies); setIsLoading(false); }) .catch((error) => { - console.error('Error:', error); + // console.error('Error:', error); setIsLoading(false); }); }; diff --git a/src/components/ui/adminSelection/memberSelection.tsx b/src/components/ui/adminSelection/memberSelection.tsx index 54a88088..bfdff953 100644 --- a/src/components/ui/adminSelection/memberSelection.tsx +++ b/src/components/ui/adminSelection/memberSelection.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import './memberSelection.scss'; import AdminSearch from '../../../asset/image/admin-search.svg'; import Button from '../button/Button/Button'; @@ -6,6 +6,7 @@ import { ACCESS_TOKEN, BASE_URL } from '../../global/constants'; import Calendar from '../calendar/calendar'; export default function MemberSelection() { + const [isLoading, setIsLoading] = useState(false); const fetchMember = (pageNo: number) => { const queryParams = new URLSearchParams({ pageNo: pageNo.toString(), @@ -20,13 +21,14 @@ export default function MemberSelection() { }) .then((response) => response.json()) .then((data: Response) => { - console.log(data); + // console.log(data); }) .catch((error) => { - console.error('Error:', error); + // console.error('Error:', error); + setIsLoading(false); }); }; - console.log(fetchMember(0)); + // console.log(fetchMember(0)); return (
From d0528ada5ee3651e2fa4300e903266538237bd6b Mon Sep 17 00:00:00 2001 From: kmin-jeong Date: Sat, 11 May 2024 08:43:19 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:console.log=20//=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/adminSelection/companySelection.tsx | 2 ++ src/components/ui/adminSelection/memberSelection.tsx | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/components/ui/adminSelection/companySelection.tsx b/src/components/ui/adminSelection/companySelection.tsx index 6adbc48d..f54101e9 100644 --- a/src/components/ui/adminSelection/companySelection.tsx +++ b/src/components/ui/adminSelection/companySelection.tsx @@ -107,6 +107,7 @@ export default function CompanySelection() { .catch((error) => { // console.error('Error:', error); setIsLoading(false); + error; }); const url = `${BASE_URL}/api/company/admin?${queryParams.toString()}`; @@ -124,6 +125,7 @@ export default function CompanySelection() { }) .catch((error) => { // console.error('Error:', error); + error; setIsLoading(false); }); }; diff --git a/src/components/ui/adminSelection/memberSelection.tsx b/src/components/ui/adminSelection/memberSelection.tsx index bfdff953..8d25da84 100644 --- a/src/components/ui/adminSelection/memberSelection.tsx +++ b/src/components/ui/adminSelection/memberSelection.tsx @@ -7,6 +7,7 @@ import Calendar from '../calendar/calendar'; export default function MemberSelection() { const [isLoading, setIsLoading] = useState(false); + const fetchMember = (pageNo: number) => { const queryParams = new URLSearchParams({ pageNo: pageNo.toString(), @@ -26,9 +27,14 @@ export default function MemberSelection() { .catch((error) => { // console.error('Error:', error); setIsLoading(false); + error; + { + isLoading; + } }); }; // console.log(fetchMember(0)); + fetchMember; return (
From f3d2053ed0387af22b2d8e2d6e86599f6d1b0fd5 Mon Sep 17 00:00:00 2001 From: kmin-jeong Date: Sat, 11 May 2024 08:51:24 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:console.log=20//=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/adminSelection/companySelection.tsx | 5 +- .../ui/adminSelection/memberSelection.tsx | 52 +++++++++---------- 2 files changed, 26 insertions(+), 31 deletions(-) diff --git a/src/components/ui/adminSelection/companySelection.tsx b/src/components/ui/adminSelection/companySelection.tsx index f54101e9..4e3dc55d 100644 --- a/src/components/ui/adminSelection/companySelection.tsx +++ b/src/components/ui/adminSelection/companySelection.tsx @@ -105,9 +105,8 @@ export default function CompanySelection() { seTtotalCompanyCount(data.data.totalElements); }) .catch((error) => { - // console.error('Error:', error); + console.error('Error:', error); setIsLoading(false); - error; }); const url = `${BASE_URL}/api/company/admin?${queryParams.toString()}`; @@ -125,7 +124,7 @@ export default function CompanySelection() { }) .catch((error) => { // console.error('Error:', error); - error; + console.error('Error:', error); setIsLoading(false); }); }; diff --git a/src/components/ui/adminSelection/memberSelection.tsx b/src/components/ui/adminSelection/memberSelection.tsx index 8d25da84..1d22cc9a 100644 --- a/src/components/ui/adminSelection/memberSelection.tsx +++ b/src/components/ui/adminSelection/memberSelection.tsx @@ -6,35 +6,31 @@ import { ACCESS_TOKEN, BASE_URL } from '../../global/constants'; import Calendar from '../calendar/calendar'; export default function MemberSelection() { - const [isLoading, setIsLoading] = useState(false); + // const [isLoading, setIsLoading] = useState(false); - const fetchMember = (pageNo: number) => { - const queryParams = new URLSearchParams({ - pageNo: pageNo.toString(), - criterion: 'createdAt', - }); - const url = `${BASE_URL}/api/member/admin?${queryParams.toString()}`; - fetch(url, { - headers: { - Authorization: `Bearer ${localStorage.getItem(ACCESS_TOKEN)}`, - 'Content-Type': 'application/json', - }, - }) - .then((response) => response.json()) - .then((data: Response) => { - // console.log(data); - }) - .catch((error) => { - // console.error('Error:', error); - setIsLoading(false); - error; - { - isLoading; - } - }); - }; - // console.log(fetchMember(0)); - fetchMember; + // const fetchMember = (pageNo: number) => { + // const queryParams = new URLSearchParams({ + // pageNo: pageNo.toString(), + // criterion: 'createdAt', + // }); + // const url = `${BASE_URL}/api/member/admin?${queryParams.toString()}`; + // fetch(url, { + // headers: { + // Authorization: `Bearer ${localStorage.getItem(ACCESS_TOKEN)}`, + // 'Content-Type': 'application/json', + // }, + // }) + // .then((response) => response.json()) + // .then((data: Response) => { + // // console.log(data); + // }) + // .catch((error) => { + // console.error('Error:', error); + // setIsLoading(false); + // }); + // }; + // // console.log(fetchMember(0)); + // fetchMember; return (
From b0f396f844b154b0f7829b347d2bd7d3dd202039 Mon Sep 17 00:00:00 2001 From: kmin-jeong Date: Sat, 11 May 2024 08:53:31 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:console.log=20//=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/adminSelection/memberSelection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ui/adminSelection/memberSelection.tsx b/src/components/ui/adminSelection/memberSelection.tsx index 1d22cc9a..bf788bf2 100644 --- a/src/components/ui/adminSelection/memberSelection.tsx +++ b/src/components/ui/adminSelection/memberSelection.tsx @@ -1,8 +1,8 @@ -import React, { useState } from 'react'; +import React from 'react'; import './memberSelection.scss'; import AdminSearch from '../../../asset/image/admin-search.svg'; import Button from '../button/Button/Button'; -import { ACCESS_TOKEN, BASE_URL } from '../../global/constants'; +// import { ACCESS_TOKEN, BASE_URL } from '../../global/constants'; import Calendar from '../calendar/calendar'; export default function MemberSelection() {