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

console.log 제거 #315

Merged
merged 6 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions src/components/ui/adminSelection/companySelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ 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);
Expand All @@ -118,11 +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);
});
Expand Down
48 changes: 26 additions & 22 deletions src/components/ui/adminSelection/memberSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,35 @@ 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() {
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);
});
};
console.log(fetchMember(0));
// 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);
// });
// };
// // console.log(fetchMember(0));
// fetchMember;

return (
<div className="ad-memberSelection-container">
Expand Down
Loading