Skip to content

Commit

Permalink
[FE] comment: log 주석처리 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunoc committed Jul 19, 2023
1 parent ff90855 commit cb2526d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
2 changes: 0 additions & 2 deletions fe/src/components/actionHistory/ActionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const ActionList = () => {
const fetchInitialData = async () => {
const response = await fetch('/history');
const data = await response.json();
console.log(data);
setHistoryData(data.message);
};

Expand All @@ -43,7 +42,6 @@ export const ActionList = () => {
};

const handleDelete = async () => {
console.log('삭제~');
const response = await fetch('/history', {
method: 'DELETE',
});
Expand Down
9 changes: 4 additions & 5 deletions fe/src/components/main/AddModeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export const AddModeCard: React.FC<AddModeCardProps> = ({
}, []);

const handleSubmit = async (title: string, body: string) => {
console.log('Process ID: ', processId);
console.log('Submitted title: ', title);
console.log('Submitted body: ', body);
console.log('User environment: ', isMobile ? 'Mobile' : 'Web');
// console.log('Process ID: ', processId);
// console.log('Submitted title: ', title);
// console.log('Submitted body: ', body);
// console.log('User environment: ', isMobile ? 'Mobile' : 'Web');

const response = await fetch('/task', {
method: 'POST',
Expand All @@ -50,7 +50,6 @@ export const AddModeCard: React.FC<AddModeCardProps> = ({

const addCardData = await response.json();

console.log(addCardData);
onNewTask(addCardData.message);
onCancel();
};
Expand Down
4 changes: 2 additions & 2 deletions fe/src/components/main/CardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const CardList: React.FC<CardProps> = ({
method: 'DELETE',
});
const data = await response.json();
console.log(data);
// console.log(data);

setIsVisible((prevVisible) => !prevVisible);
onTaskDelete(taskId);
Expand All @@ -81,7 +81,7 @@ export const CardList: React.FC<CardProps> = ({
}

const updatedTask = await response.json();
console.log('Updated task:', updatedTask);
// console.log('Updated task:', updatedTask);
onTaskEdit({ taskId, title, contents: body });
};

Expand Down
9 changes: 4 additions & 5 deletions fe/src/components/main/ColumnTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export const ColumnTitle: React.FC<ColumnTitleProps> = ({
};

const handleSubmit = async (processId: number) => {
console.log('해당 Process ID: ', processId);
console.log('Submitted 컬럼 title: ', newTitle);
// console.log('해당 Process ID: ', processId);
// console.log('Submitted 컬럼 title: ', newTitle);

const response = await fetch(`/process/${processId}`, {
method: 'PATCH',
Expand All @@ -66,21 +66,20 @@ export const ColumnTitle: React.FC<ColumnTitleProps> = ({

const responseData = await response.json();

console.log(responseData);
// console.log(responseData);
setIsEditing((prev) => !prev);
onTitleChange(newTitle, processId);
};

const handleDelete = async () => {
console.log('삭제~');
const response = await fetch(`/process/${processId}`, {
method: 'DELETE',
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const responseData = await response.json();
console.log(responseData);
// console.log(responseData);

onColumnDelete(processId);
setIsVisible((prevVisible) => !prevVisible);
Expand Down
2 changes: 1 addition & 1 deletion fe/src/components/main/FloatingAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const FloatingActionBtn: React.FC<FloatingActionProps> = ({
});

const responseData = await response.json();
console.log(responseData);
// console.log(responseData);
if (onNewColumn) {
onNewColumn();
}
Expand Down
4 changes: 2 additions & 2 deletions fe/src/mocks/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const handlers = [
}),

rest.get('/history', (_, res, ctx) => {
console.log(actionHistory);
// console.log(actionHistory);

return res(ctx.status(200), ctx.json(actionHistory));
}),
Expand All @@ -34,7 +34,7 @@ const handlers = [
rest.patch('/task/:taskId', (req, res, ctx) => {
// const { taskId } = req.params;
const testBody = req.body;
console.log(testBody);
// console.log(testBody);

return res(
ctx.json({
Expand Down

0 comments on commit cb2526d

Please sign in to comment.