HyeonJun Jeon

[Modify] Names, debug logic

......@@ -7,21 +7,21 @@ import GridItem from "./GridItem.js";
const Grid = () => {
const { state } = useContext(CalendarStateContext);
const renderRows = () => {
const rows = [];
const renderItems = () => {
const items = [];
const ndate = new Date(state.date);
ndate.setDate(1);
toSunday(ndate);
for (let i = 0; i < 35; i++) {
rows.push(<GridItem key={i} targetDate={new Date(ndate)} />);
items.push(<GridItem key={i} targetDate={new Date(ndate)} />);
moveDate(ndate, "day", 1);
}
return rows;
return items;
};
return <div className="Grid">{renderRows()}</div>;
return <div className="Grid">{renderItems()}</div>;
};
export default Grid;
......
......@@ -6,6 +6,8 @@ import "../styles/Debug.css";
import { initTempSubjects } from "../utils/Test";
const Debug = () => {
console.log("visit Debug");
const [state, setState] = useState({
type: "login",
input1: "",
......
......@@ -3,6 +3,8 @@ import { Navigate, useNavigate } from "react-router-dom";
import "../styles/Settings.css";
const Settings = () => {
console.log("visit Settings");
const session = localStorage.getItem("session");
const navigate = useNavigate();
......
class Subject {
constructor(name, color, selected) {
this.name = name;
this.color = color;
this.selected = selected;
}
}
export default Subject;