Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL committed Jan 1, 2025
1 parent 4081081 commit fe0fe16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/atoms/MonthNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ function MonthNav({ monthNum, changeMonth }: MonthNavProps) {
const handleMonthChange = (dir: "left" | "right") => {
if (dir === "left") {
if (monthNum === 10) {
toast("info", "달력이 존재하지 않습니다.");
toast("info", "달력 준비중");
return;
}
changeMonth((old) => old.subtract(1, "month"));
} else {
if (monthNum === 11) {
toast("info", "달력이 존재하지 않습니다.");
toast("info", "달력 준비중");
return;
}
changeMonth((old) => old.add(1, "month"));
Expand Down
4 changes: 3 additions & 1 deletion pages/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import Slide from "../components/layouts/PageSlide";
import { CALENDAR_IMAGES } from "../constants/contents/calendarSchedule";

function CalendarPage() {
const [monthFirstDate, setMonthFirstDate] = useState(dayjs().startOf("month"));
const [monthFirstDate, setMonthFirstDate] = useState(
dayjs().startOf("month").subtract(1, "month"),
);
const monthNum = monthFirstDate.month();
const [isImageLoaded, setIsImageLoaded] = useState(false);
console.log(monthNum);
Expand Down

0 comments on commit fe0fe16

Please sign in to comment.