@@ -11,8 +11,7 @@ import CalendarIcon from "../assets/CalendarIcon";
1111import ListIcon from "../assets/ListIcon" ;
1212import CalendarIconSelected from "../assets/CalendarIconSelected" ;
1313import ListIconSelected from "../assets/ListIconSelected" ;
14- import ListDot from "../assets/listDot" ;
15- //import profileImage from "../assets/profile.jpg";
14+ import ListDot from "../assets/ListDot" ;
1615
1716/*
1817 좌측 사이드바
@@ -21,12 +20,12 @@ import ListDot from "../assets/listDot";
2120
2221*/
2322
24- const SidebarLeft = ( { events = [ ] , isOpen = false , onToggle } ) => {
23+ const SidebarLeft = ( { events = [ ] } ) => {
2524 const navigate = useNavigate ( ) ;
2625 const location = useLocation ( ) ;
2726
2827 // 사이드바 상태
29- // const [isOpen, setIsOpen] = useState(false);
28+ const [ isOpen , setIsOpen ] = useState ( false ) ;
3029
3130 // 페이지 상태
3231 const isHomePage = location . pathname === "/home" ;
@@ -166,7 +165,7 @@ const SidebarLeft = ({ events = [], isOpen = false, onToggle }) => {
166165 onMouseEnter = { ( ) => ! isOpen && setIsLogoHovered ( true ) }
167166 onMouseLeave = { ( ) => setIsLogoHovered ( false ) }
168167 >
169- < button className = "sidebarButton" onClick = { ( ) => onToggle ?. ( ! isOpen ) } >
168+ < button className = "sidebarButton" onClick = { ( ) => setIsOpen ( ! isOpen ) } >
170169 { isOpen ? < CloseButton /> : < OpenButton /> }
171170 </ button >
172171 < LogoIcon className = "logoIcon" />
@@ -179,10 +178,8 @@ const SidebarLeft = ({ events = [], isOpen = false, onToggle }) => {
179178 < NewButton />
180179 </ div >
181180 ) : (
182- < div className = "buttonIconClosed" >
183- < div className = { isCreatePage ? "newButtonRotated" : "" } >
184- < NewButtonClosed />
185- </ div >
181+ < div className = { `buttonIconClosed ${ isCreatePage ? "Rotated" : "" } ` } >
182+ < NewButtonClosed />
186183 </ div >
187184 ) }
188185 { isOpen && < div className = "buttonText" > 새로운 약속 만들기</ div > }
@@ -203,21 +200,29 @@ const SidebarLeft = ({ events = [], isOpen = false, onToggle }) => {
203200 { /* 약속 달력 */ }
204201 < div className = "calendar" >
205202 < div className = "calendarHeader" >
206- < button className = "moveMonth" onClick = { ( ) => moveMonth ( - 1 ) } > { "<" } </ button >
203+ < button className = "moveMonth" onClick = { ( ) => moveMonth ( - 1 ) } >
204+ { "<" }
205+ </ button >
207206 < span > { currentMonth + 1 } 월</ span >
208- < button className = "moveMonth" onClick = { ( ) => moveMonth ( 1 ) } > { ">" } </ button >
209- < button className = "todayButton" onClick = { handleGoToday } > 오늘</ button >
207+ < button className = "moveMonth" onClick = { ( ) => moveMonth ( 1 ) } >
208+ { ">" }
209+ </ button >
210+ < button className = "todayButton" onClick = { handleGoToday } >
211+ 오늘
212+ </ button >
210213 </ div >
211214
212215 { /* 요일 */ }
213216 < div className = "calendarGrid daysofWeek" >
214217 { daysOfWeek . map ( ( day , index ) => {
215- < div
216- key = { day }
217- className = { `dayName ${ index === 0 ? "sunday" : "" } ${ index === 6 ? "saturday" : "" } ` }
218- >
219- { day }
220- </ div >
218+ < div
219+ key = { day }
220+ className = { `dayName ${ index === 0 ? "sunday" : "" } ${
221+ index === 6 ? "saturday" : ""
222+ } `}
223+ >
224+ { day }
225+ </ div > ;
221226 } ) }
222227 </ div >
223228
@@ -234,8 +239,7 @@ const SidebarLeft = ({ events = [], isOpen = false, onToggle }) => {
234239 key = { a . id }
235240 className = { `appointmentItem` }
236241 onClick = { ( ) =>
237- a . invite_link &&
238- navigate ( `/result/${ a . invite_link } ` )
242+ a . invite_link && navigate ( `/result/${ a . invite_link } ` )
239243 }
240244 >
241245 < ListDot />
@@ -247,9 +251,7 @@ const SidebarLeft = ({ events = [], isOpen = false, onToggle }) => {
247251 </ div >
248252
249253 { /* 프로필 */ }
250- < div className = "profile" >
251- { /* <img src={profileImage} alt="profileImage" /> */ }
252- </ div >
254+ < div className = "profile" />
253255 </ div >
254256 </ >
255257 ) ;
0 commit comments