Skip to content

Commit

Permalink
Merge pull request #66 from 42Mogle/refactor/home_page_spliting#52
Browse files Browse the repository at this point in the history
fix: Add test console.log #52
  • Loading branch information
Han-Joon-Hyeok authored Dec 1, 2022
2 parents 9d8a0f0 + 5e9dfef commit 8e71912
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Pages/HomePage/AttendanceLog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TableBody from "@mui/material/TableBody";
import TableHead from "@mui/material/TableHead";

const AttendanceLog = ({ open, attendanceLog }) => {
if (!attendanceLog.length) {
if (!attendanceLog && attendanceLog.length === 0) {
return;
} else {
return (
Expand Down
1 change: 1 addition & 0 deletions src/Pages/HomePage/AttendanceSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";

function AttendaceSummary(props) {
const { summary, attendanceLog } = props;
console.log(summary);
const [open, setOpen] = useState(false);
return (
<React.Fragment>
Expand Down
2 changes: 2 additions & 0 deletions src/Pages/HomePage/AttendanceTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const AttendanceTable = ({ summary }) => {
return { date: _date, time: _time };
});

console.log(attendanceList);

setAttendanceLog(attendanceList);
} catch (error) {
console.log(error);
Expand Down
3 changes: 2 additions & 1 deletion src/Pages/HomePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Home() {
const response = await axios.get(
`https://${process.env.REACT_APP_AWS_BACKEND_SERVER}/statistic/${_intraId}/userAttendanceState`
, config);
console.log(response.data);
console.log(`getSummary: ${response}`);
setSummary(response.data);
} catch (error) {
console.log(error);
Expand All @@ -47,6 +47,7 @@ function Home() {
const response = await axios.get(
`https://${process.env.REACT_APP_AWS_BACKEND_SERVER}/user/${_intraId}`
, config);
console.log(`getUserInfo: ${response}`);
if (response.data.isOperator) {
setIsOperator(true);
}
Expand Down

0 comments on commit 8e71912

Please sign in to comment.