From fa52b2faba62df4faf877d1ef74e1ca7370b6d3d Mon Sep 17 00:00:00 2001 From: dmson1218 Date: Wed, 6 Dec 2023 16:08:59 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20useState=20=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 직접 import 해서 사용 --- FE/src/components/DiaryModal/Calendar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FE/src/components/DiaryModal/Calendar.js b/FE/src/components/DiaryModal/Calendar.js index 02bde35..813ae3a 100644 --- a/FE/src/components/DiaryModal/Calendar.js +++ b/FE/src/components/DiaryModal/Calendar.js @@ -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"; @@ -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);