@@ -134,7 +134,7 @@ const notionData = [
134134 ] ,
135135 } ,
136136 { id : 5 , title : '목표' , children : [ ] } ,
137- { id : 6 , title : '독서 리스트 ' , children : [ ] } ,
137+ { id : 6 , title : '독서리스트 ' , children : [ ] } ,
138138 { id : 7 , title : '나의 공간' , children : [ ] } ,
139139 ] ,
140140 } ,
@@ -147,7 +147,9 @@ const BotStepNotion = ({ onClose }) => {
147147
148148 const toggleOpen = ( id ) => {
149149 setOpenNodes ( ( prev ) =>
150- prev . includes ( id ) ? prev . filter ( ( nodeId ) => nodeId !== id ) : [ ...prev , id ]
150+ prev . includes ( id )
151+ ? prev . filter ( ( nodeId ) => nodeId !== id )
152+ : [ ...prev , id ]
151153 ) ;
152154 } ;
153155
@@ -166,7 +168,9 @@ const BotStepNotion = ({ onClose }) => {
166168 const childIds = getAllChildIds ( children ) ;
167169 setSelectedPages ( ( prev ) => {
168170 if ( prev . includes ( id ) ) {
169- return prev . filter ( ( pageId ) => ! [ id , ...childIds ] . includes ( pageId ) ) ;
171+ return prev . filter (
172+ ( pageId ) => ! [ id , ...childIds ] . includes ( pageId )
173+ ) ;
170174 } else {
171175 return [ ...prev , id , ...childIds ] ;
172176 }
@@ -191,33 +195,50 @@ const BotStepNotion = ({ onClose }) => {
191195 onClick = { ( ) => toggleSelect ( node . id , node . children ) }
192196 >
193197 < img
194- src = { selectedPages . includes ( node . id ) ? checkWhite : checkBlack }
198+ src = {
199+ selectedPages . includes ( node . id )
200+ ? checkWhite
201+ : checkBlack
202+ }
195203 alt = "Check"
196204 />
197205 </ div >
198206 < span
199207 style = { {
200- fontWeight : selectedPages . includes ( node . id ) ? 'bold' : 'normal' ,
208+ fontWeight : selectedPages . includes ( node . id )
209+ ? 'bold'
210+ : 'normal' ,
201211 } }
202212 >
203213 { node . title }
204214 </ span >
205215 </ div >
206- { openNodes . includes ( node . id ) && < div style = { { marginLeft : 20 } } > { renderTree ( node . children , depth + 1 ) } </ div > }
216+ { openNodes . includes ( node . id ) && (
217+ < div style = { { marginLeft : 20 } } >
218+ { renderTree ( node . children , depth + 1 ) }
219+ </ div >
220+ ) }
207221 </ li >
208222 ) ) }
209223 </ ul >
210224 ) ;
211225
212226 return (
213227 < div css = { modalStyle } >
214- < span css = { closeButton } onClick = { onClose } > ❌</ span >
228+ < span css = { closeButton } onClick = { onClose } >
229+ ❌
230+ </ span >
215231 < div >
216- < h3 css = { titleText } > 추가하고 싶은 < b > Notion</ b > 페이지를 넣어주세요.</ h3 >
232+ < h3 css = { titleText } >
233+ 추가하고 싶은 < b > Notion</ b > 페이지를 넣어주세요.
234+ </ h3 >
217235 { renderTree ( notionData ) }
218236 </ div >
219237 < div css = { buttonContainer } >
220- < button css = { buttonStyle ( selectedPages . length > 0 ) } onClick = { ( ) => navigate ( '/bot/list' ) } >
238+ < button
239+ css = { buttonStyle ( selectedPages . length > 0 ) }
240+ onClick = { ( ) => navigate ( '/bot/list' ) }
241+ >
221242 < img src = { arrowIcon } alt = "Next" css = { arrowIconStyle } />
222243 생성하기
223244 </ button >
0 commit comments