@@ -184,42 +184,52 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
184184 </ li >
185185 ) : (
186186 < li >
187- { node . name !== "" && (
188- // Node with entire folder
189- // Render svg button + folder name, then children
190- < div class = "folder-container" >
191- < svg
192- xmlns = "http://www.w3.org/2000/svg"
193- width = "12"
194- height = "12"
195- viewBox = "5 8 14 8"
196- fill = "none"
197- stroke = "currentColor"
198- stroke-width = "2"
199- stroke-linecap = "round"
200- stroke-linejoin = "round"
201- class = "folder-icon"
202- >
203- < polyline points = "6 9 12 15 18 9" > </ polyline >
204- </ svg >
205- { /* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */ }
206- < div key = { node . name } data-folderpath = { folderPath } >
207- { folderBehavior === "link" ? (
208- < a
209- href = { resolveRelative ( fileData . slug ! , folderPath as SimpleSlug ) }
210- data-for = { node . name }
211- class = "folder-title"
187+ { node . name !== "" && (
188+ node . children . length !== 0 ? (
189+ // Node with entire folder
190+ // Render svg button + folder name, then children
191+ < div class = "folder-container" >
192+ < svg
193+ xmlns = "http://www.w3.org/2000/svg"
194+ width = "12"
195+ height = "12"
196+ viewBox = "5 8 14 8"
197+ fill = "none"
198+ stroke = "currentColor"
199+ stroke-width = "2"
200+ stroke-linecap = "round"
201+ stroke-linejoin = "round"
202+ class = "folder-icon"
212203 >
213- { node . displayName }
214- </ a >
215- ) : (
216- < button class = "folder-button" >
217- < span class = "folder-title" > { node . displayName } </ span >
218- </ button >
219- ) }
220- </ div >
221- </ div >
222- ) }
204+ < polyline points = "6 9 12 15 18 9" > </ polyline >
205+ </ svg >
206+ { /* render <a> tag if folderBehavior is "link", otherwise render <button> with collapse click event */ }
207+ < div key = { node . name } data-folderpath = { folderPath } >
208+ { folderBehavior === "link" ? (
209+ < a
210+ href = { resolveRelative ( fileData . slug ! , folderPath as SimpleSlug ) }
211+ data-for = { node . name }
212+ class = "folder-title"
213+ >
214+ { node . displayName }
215+ </ a >
216+ ) : (
217+ < button class = "folder-button" >
218+ < span class = "folder-title" > { node . displayName } </ span >
219+ </ button >
220+ ) }
221+ </ div >
222+ </ div >
223+ ) :
224+ (
225+ {
226+ 'Software Development Experience' : < a href = '../../portfolio/dev' > Software Development Experience</ a > ,
227+ 'Technical Writing Experience' : < a href = '../../portfolio/technical-writing' > Technical Writing Experience</ a > ,
228+ 'Front Porch' : null
229+ } [ node . displayName ]
230+ )
231+ )
232+ }
223233 { /* Recursively render children of folder */ }
224234 < div class = { `folder-outer ${ node . depth === 0 || isDefaultOpen ? "open" : "" } ` } >
225235 < ul
0 commit comments