@@ -144,20 +144,7 @@ const getSpecificationPath = [
144
144
'/specification-links' ,
145
145
'/specification' ,
146
146
] ;
147
- const getResourcePath = [
148
- '/resources/books' ,
149
- '/resources/podcasts' ,
150
- '/resources/papers' ,
151
- '/resources/audios' ,
152
- '/resources/courses' ,
153
- ] ;
154
- const resourceRoutes = [
155
- { uri : '/resources/books' , label : 'Books' } ,
156
- { uri : '/resources/courses' , label : 'Courses' } ,
157
- { uri : '/resources/videos' , label : 'Videos' } ,
158
- { uri : '/resources/podcasts' , label : 'Podcasts' } ,
159
- { uri : '/resources/papers' , label : 'Papers' } ,
160
- ] ;
147
+
161
148
export const SidebarLayout = ( { children } : { children : React . ReactNode } ) => {
162
149
const router = useRouter ( ) ;
163
150
const [ open , setOpen ] = useState ( false ) ;
@@ -263,7 +250,6 @@ export const DocsNav = ({
263
250
getStarted : false ,
264
251
getReference : false ,
265
252
getSpecification : false ,
266
- getResources : false ,
267
253
} ) ;
268
254
useEffect ( ( ) => {
269
255
const pathWtihoutFragment = extractPathWithoutFragment ( router . asPath ) ;
@@ -275,8 +261,6 @@ export const DocsNav = ({
275
261
setActive ( { ...active , getReference : true } ) ;
276
262
} else if ( getSpecificationPath . includes ( pathWtihoutFragment ) ) {
277
263
setActive ( { ...active , getSpecification : true } ) ;
278
- } else if ( getResourcePath . includes ( router . asPath ) ) {
279
- setActive ( { ...active , getResources : true } ) ;
280
264
}
281
265
} , [ router . asPath ] ) ;
282
266
@@ -296,37 +280,28 @@ export const DocsNav = ({
296
280
setActive ( { ...active , getSpecification : ! active . getSpecification } ) ;
297
281
} ;
298
282
299
- const handleClickResources = ( ) => {
300
- setActive ( { ...active , getResources : ! active . getResources } ) ;
301
- } ;
302
-
303
283
const rotate = active . getDocs ? 'rotate(180deg)' : 'rotate(0)' ;
304
284
const rotateG = active . getStarted ? 'rotate(180deg)' : 'rotate(0)' ;
305
285
const rotateR = active . getReference ? 'rotate(180deg)' : 'rotate(0)' ;
306
286
const rotateSpec = active . getSpecification ? 'rotate(180deg)' : 'rotate(0)' ;
307
- const rotateResources = active . getResources ? 'rotate(180deg)' : 'rotate(0)' ;
308
287
309
288
const { theme } = useTheme ( ) ;
310
289
311
290
const [ learn_icon , setLearn_icon ] = useState ( '' ) ;
312
291
const [ reference_icon , setReference_icon ] = useState ( '' ) ;
313
292
const [ spec_icon , setSpec_icon ] = useState ( '' ) ;
314
293
const [ overview_icon , setOverview_icon ] = useState ( '' ) ;
315
- const [ resources_icon , setResources_icon ] = useState ( '' ) ;
316
-
317
294
useEffect ( ( ) => {
318
295
if ( theme === 'dark' ) {
319
296
setOverview_icon ( '/icons/eye-dark.svg' ) ;
320
297
setLearn_icon ( '/icons/compass-dark.svg' ) ;
321
298
setReference_icon ( '/icons/book-dark.svg' ) ;
322
299
setSpec_icon ( '/icons/clipboard-dark.svg' ) ;
323
- setResources_icon ( '/icons/bookshelf-dark.svg' ) ;
324
300
} else {
325
301
setOverview_icon ( '/icons/eye.svg' ) ;
326
302
setLearn_icon ( '/icons/compass.svg' ) ;
327
303
setReference_icon ( '/icons/book.svg' ) ;
328
304
setSpec_icon ( '/icons/clipboard.svg' ) ;
329
- setResources_icon ( '/icons/bookshelf.svg' ) ;
330
305
}
331
306
} , [ theme ] ) ;
332
307
@@ -732,50 +707,6 @@ export const DocsNav = ({
732
707
</ div >
733
708
</ div >
734
709
</ div >
735
- { /* Resources */ }
736
- < div className = 'mb-2 bg-slate-200 dark:bg-slate-900 p-2 rounded' >
737
- < div
738
- className = 'flex justify-between w-full items-center'
739
- onClick = { handleClickResources }
740
- >
741
- < div className = 'flex items-center align-middle' >
742
- < img
743
- src = { `${ resources_icon } ` }
744
- alt = 'eye icon'
745
- className = 'mr-2 w-6'
746
- />
747
- < SegmentHeadline label = 'Other Resources' />
748
- </ div >
749
- < svg
750
- id = 'arrow'
751
- className = 'arrow'
752
- style = { {
753
- transform : rotateResources ,
754
- transition : 'all 0.2s linear' ,
755
- } }
756
- xmlns = 'http://www.w3.org/2000/svg'
757
- fill = 'none'
758
- height = '32'
759
- viewBox = '0 0 24 24'
760
- width = '24'
761
- >
762
- < path
763
- clipRule = 'evenodd'
764
- d = 'm16.5303 8.96967c.2929.29289.2929.76777 0 1.06063l-4 4c-.2929.2929-.7677.2929-1.0606 0l-4.00003-4c-.29289-.29286-.29289-.76774 0-1.06063s.76777-.29289 1.06066 0l3.46967 3.46963 3.4697-3.46963c.2929-.29289.7677-.29289 1.0606 0z'
765
- fill = '#707070'
766
- fillRule = 'evenodd'
767
- />
768
- </ svg >
769
- </ div >
770
- < div
771
- className = { classnames ( 'ml-6' , { hidden : ! active . getResources } ) }
772
- id = 'resources'
773
- >
774
- { resourceRoutes . map ( ( { uri, label } ) => (
775
- < DocLink key = { uri } uri = { uri } label = { label } setOpen = { setOpen } />
776
- ) ) }
777
- </ div >
778
- </ div >
779
710
</ div >
780
711
) ;
781
712
} ;
0 commit comments