Skip to content

Commit

Permalink
chore: useState 사용 방식 통일
Browse files Browse the repository at this point in the history
- 직접 import 해서 사용
  • Loading branch information
dmson1218 committed Dec 6, 2023
1 parent 24e60d1 commit fa52b2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FE/src/components/DiaryModal/Calendar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useLayoutEffect } from "react";
import React, { useState, useLayoutEffect } from "react";
import styled from "styled-components";
import toggleIcon from "../../assets/toggleIcon.svg";
import leftIcon from "../../assets/leftIcon.svg";
Expand Down Expand Up @@ -46,9 +46,9 @@ const getColor = (index) => {

function Calendar(props) {
const { date, setData } = props;
const [isCalendarOpen, setIsCalendarOpen] = React.useState(false);
const [calendarDate, setCalendarDate] = React.useState(new Date());
const [selectedDate, setSelectedDate] = React.useState(new Date());
const [isCalendarOpen, setIsCalendarOpen] = useState(false);
const [calendarDate, setCalendarDate] = useState(new Date());
const [selectedDate, setSelectedDate] = useState(new Date());

useLayoutEffect(() => {
setCalendarDate(date);
Expand Down

0 comments on commit fa52b2f

Please sign in to comment.