From 199d0d84778de696b8bf23f3571aab79c74f7b72 Mon Sep 17 00:00:00 2001 From: ohinhyuk <8156217@naver.com> Date: Mon, 4 Sep 2023 15:30:47 +0900 Subject: [PATCH] =?UTF-8?q?Refactor=20:=20=EC=BD=98=EC=86=94=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Manager/GroupTables.js | 4 +--- .../src/components/Manager/ReportTable.js | 2 -- .../components/Manager/StudentListTable.js | 2 -- .../src/components/Manager/StudyGroupTable.js | 2 -- .../src/components/Manager/UnGroupTable.js | 1 - .../src/components/Post/PostCourses.js | 4 ---- .../src/components/Post/PostMember.js | 1 - .../src/pages/Manager/ManageGroup.js | 1 - .../src/pages/Manager/ManageReport.js | 4 ---- .../src/pages/Manager/ReportDetail.js | 3 --- histudy-front/src/pages/Post/Post.js | 2 -- histudy-front/src/pages/Rank/Rank.js | 22 ++++--------------- 12 files changed, 5 insertions(+), 43 deletions(-) diff --git a/histudy-front/src/components/Manager/GroupTables.js b/histudy-front/src/components/Manager/GroupTables.js index d9e2167..3a053b8 100644 --- a/histudy-front/src/components/Manager/GroupTables.js +++ b/histudy-front/src/components/Manager/GroupTables.js @@ -49,7 +49,6 @@ export default function GroupTables({ newGroupEdit[groupId] = !newGroupEdit[groupId]; setEdit(newGroupEdit); - console.log(index); const newEdit = [...studentEdit]; newEdit[index] = !newEdit[index]; @@ -103,7 +102,7 @@ export default function GroupTables({ sx={{ display: "flex", justifyContent: "space-between", - borderTop: 1, + // borderTop: 1, borderColor: "primary.main", px: "30px", }} @@ -358,7 +357,6 @@ export default function GroupTables({ name: student.name, id: student.id, }; - console.log(newData); editUser(newData) .then(() => { diff --git a/histudy-front/src/components/Manager/ReportTable.js b/histudy-front/src/components/Manager/ReportTable.js index 20cfb90..d745afa 100644 --- a/histudy-front/src/components/Manager/ReportTable.js +++ b/histudy-front/src/components/Manager/ReportTable.js @@ -15,8 +15,6 @@ export default function ReportTable({ const navigate = useNavigate(); const clickReport = (index) => { - console.log(index); - navigate("/reportDetail", { state: index }); }; const handleDeleteRow = (index) => {}; diff --git a/histudy-front/src/components/Manager/StudentListTable.js b/histudy-front/src/components/Manager/StudentListTable.js index b952a04..67d7550 100644 --- a/histudy-front/src/components/Manager/StudentListTable.js +++ b/histudy-front/src/components/Manager/StudentListTable.js @@ -35,7 +35,6 @@ export default function StudentListTable({ const [edit, setEdit] = useState([false]); const handleEdit = (index) => { - console.log(index); const newEdit = [...edit]; newEdit[index] = !newEdit[index]; setEdit(newEdit); @@ -44,7 +43,6 @@ export default function StudentListTable({ const navigate = useNavigate(); const handleDeleteRow = (index) => {}; const handleClick = () => { - console.info("You clicked the Chip."); navigate("/manageReport"); }; const handleSave = (id) => { diff --git a/histudy-front/src/components/Manager/StudyGroupTable.js b/histudy-front/src/components/Manager/StudyGroupTable.js index 8d30e74..074531a 100644 --- a/histudy-front/src/components/Manager/StudyGroupTable.js +++ b/histudy-front/src/components/Manager/StudyGroupTable.js @@ -34,8 +34,6 @@ export default function StudyGroupTable({ const navigate = useNavigate(); const handleClick = (id) => { - console.info("You clicked the Chip."); - console.log("id: " + id); navigate("/manageReport", { state: id }); }; diff --git a/histudy-front/src/components/Manager/UnGroupTable.js b/histudy-front/src/components/Manager/UnGroupTable.js index f7676ba..bbd0125 100644 --- a/histudy-front/src/components/Manager/UnGroupTable.js +++ b/histudy-front/src/components/Manager/UnGroupTable.js @@ -316,7 +316,6 @@ export default function UnGroupTable({ name: row.name, id: row.id, }; - console.log(newData); editUser(newData) .then((res) => { diff --git a/histudy-front/src/components/Post/PostCourses.js b/histudy-front/src/components/Post/PostCourses.js index 6088ce4..f800daa 100644 --- a/histudy-front/src/components/Post/PostCourses.js +++ b/histudy-front/src/components/Post/PostCourses.js @@ -6,8 +6,6 @@ import { Controller } from "react-hook-form"; export default function PostCourses({ control, setValue, getValues }) { const [teamMemberCourses, setTeamMemberCourses] = useState([]); useEffect(() => { - // teamCourses().then((res) => console.log(res)); - console.log(teamCourses().then((res) => console.log("dd", res))); teamCourses().then((res) => setTeamMemberCourses(res.courses)); }, []); @@ -15,8 +13,6 @@ export default function PostCourses({ control, setValue, getValues }) { let { value, checked } = event.target; // value = value.slice(value.length - 8, value.length); - console.log(event.target.value); - if (checked) { setValue("courses", [...getValues("courses"), value]); } else { diff --git a/histudy-front/src/components/Post/PostMember.js b/histudy-front/src/components/Post/PostMember.js index e323e8d..8f3e924 100644 --- a/histudy-front/src/components/Post/PostMember.js +++ b/histudy-front/src/components/Post/PostMember.js @@ -8,7 +8,6 @@ export default function PostMember({ control, setValue, getValues }) { useEffect(() => { getMyTeamUsers().then((res) => { setTeamMember(res); - console.log("Tmembers", res); }); }, []); diff --git a/histudy-front/src/pages/Manager/ManageGroup.js b/histudy-front/src/pages/Manager/ManageGroup.js index d1f6876..d44730d 100644 --- a/histudy-front/src/pages/Manager/ManageGroup.js +++ b/histudy-front/src/pages/Manager/ManageGroup.js @@ -70,7 +70,6 @@ export default function ManageGroup() { cacheTime: 5 * 60 * 1000, onSuccess: (data) => { - console.log("ungroup data", data); setUngroupData(data); }, }, diff --git a/histudy-front/src/pages/Manager/ManageReport.js b/histudy-front/src/pages/Manager/ManageReport.js index 740cf31..9e69821 100644 --- a/histudy-front/src/pages/Manager/ManageReport.js +++ b/histudy-front/src/pages/Manager/ManageReport.js @@ -32,8 +32,6 @@ export default function ManageReport() { useEffect(() => { if (state) { readGroupReport(state).then((data) => { - console.log("data"); - console.log(data); setReportData(data); }); } @@ -96,8 +94,6 @@ export default function ManageReport() { navigate(-1); }; const clickReport = (index) => { - console.log(index); - navigate("/reportDetail", { state: index }); }; return ( diff --git a/histudy-front/src/pages/Manager/ReportDetail.js b/histudy-front/src/pages/Manager/ReportDetail.js index 7ba9d64..95f62c7 100644 --- a/histudy-front/src/pages/Manager/ReportDetail.js +++ b/histudy-front/src/pages/Manager/ReportDetail.js @@ -54,8 +54,6 @@ export default function ReportDetail() { } }, []); - console.log(state); - const navigate = useNavigate(); const moveToBefore = () => { @@ -63,7 +61,6 @@ export default function ReportDetail() { }; const handleClick = async (buttonId) => { - console.log(buttonId, "clicked"); if (buttonId === "modify") { navigate(`/report/modify/${state.id}`, { state: state }); } else if (buttonId === "delete") { diff --git a/histudy-front/src/pages/Post/Post.js b/histudy-front/src/pages/Post/Post.js index 82d62d5..9b25ab3 100644 --- a/histudy-front/src/pages/Post/Post.js +++ b/histudy-front/src/pages/Post/Post.js @@ -32,7 +32,6 @@ import { StyledColumnAlignLayout } from "../../components/common/StyledLayout"; export default function Post({ children }) { const { state } = useLocation(); - console.log("작성", state); const [isCodeModal, setIsCodeModal] = useState(false); const { handleSubmit, watch, setValue, getValues, control } = useForm({ @@ -60,7 +59,6 @@ export default function Post({ children }) { images: formData.images, courses: formData.courses, }; - console.log(newReport); state ? modifyReport(state.id, newReport) : postReport(newReport); alert("보고서 제출이 완료되었습니다."); diff --git a/histudy-front/src/pages/Rank/Rank.js b/histudy-front/src/pages/Rank/Rank.js index 367795d..e085358 100644 --- a/histudy-front/src/pages/Rank/Rank.js +++ b/histudy-front/src/pages/Rank/Rank.js @@ -1,30 +1,17 @@ -import { - Avatar, - Chip, - Grid, - IconButton, - ImageList, - ImageListItemBar, - ListSubheader, - Typography, - styled, -} from "@mui/material"; +import { Grid, ImageList, styled } from "@mui/material"; import { Box } from "@mui/system"; -import CustomTable from "../../components/common/CustomTable"; -import { InfoIcon } from "../../theme/overrides/CustomIcons"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { getAllTeamsForRank } from "../../apis/rank"; -import LooksOneIcon from "@mui/icons-material/LooksOne"; import HoverBox from "../../components/Rank/HoverBox"; import { AnimatePresence, motion } from "framer-motion"; -import { Image } from "@mui/icons-material"; + import NoDataLottie from "../../components/common/NoDataLottie"; import { StyledColumnAlignLayout } from "../../components/common/StyledLayout"; import Title from "../../components/common/Title"; import { useQuery } from "react-query"; -import ImageListItem from "../../components/Rank/Item"; + import Item from "../../components/Rank/Item"; const StyledScrollBox = styled(Box)({ @@ -47,7 +34,6 @@ export default function Rank() { casheTime: 10 * 60 * 1000, onSuccess: (data) => { setTeams(data.teams); - console.log(data.teams); setItemsHover(new Array(data.teams.length).fill(false)); }, });