1- import React , { useState } from " react" ;
1+ import React , { useState } from ' react'
22import {
33 Nav ,
44 NavList ,
55 NavItem ,
66 PageSidebar ,
77 PageSidebarBody ,
8- } from " @patternfly/react-core" ;
9- import { useStore } from " @nanostores/react" ;
10- import { isNavOpen } from " ../stores/navStore" ;
8+ } from ' @patternfly/react-core'
9+ import { useStore } from ' @nanostores/react'
10+ import { isNavOpen } from ' ../stores/navStore'
1111
1212interface NavOnSelectProps {
13- groupId : number | string ;
14- itemId : number | string ;
15- to : string ;
13+ groupId : number | string
14+ itemId : number | string
15+ to : string
1616}
1717
1818interface NavEntry {
19- id : string ;
20- slug : string ;
19+ id : string
20+ slug : string
2121 data : {
22- title : string ;
23- } ;
24- collection : string ;
22+ title : string
23+ }
24+ collection : string
2525}
2626
2727interface NavigationProps {
28- navEntries : NavEntry [ ] ;
28+ navEntries : NavEntry [ ]
2929}
3030
3131export const Navigation : React . FunctionComponent < NavigationProps > = ( {
3232 navEntries,
3333} : NavigationProps ) => {
34- const [ activeItem , setActiveItem ] = useState ( "" ) ;
34+ const [ activeItem , setActiveItem ] = useState ( '' )
3535
3636 const onNavSelect = (
3737 _event : React . FormEvent < HTMLInputElement > ,
38- selectedItem : NavOnSelectProps
38+ selectedItem : NavOnSelectProps ,
3939 ) => {
4040 // eslint-disable-next-line @typescript-eslint/no-unused-expressions
41- typeof selectedItem . itemId === " string" &&
42- setActiveItem ( selectedItem . itemId ) ;
43- } ;
41+ typeof selectedItem . itemId === ' string' &&
42+ setActiveItem ( selectedItem . itemId )
43+ }
4444
45- const $isNavOpen = useStore ( isNavOpen ) ;
45+ const $isNavOpen = useStore ( isNavOpen )
4646
4747 const navItems = navEntries . map ( ( entry ) => (
4848 < NavItem
@@ -53,7 +53,7 @@ export const Navigation: React.FunctionComponent<NavigationProps> = ({
5353 >
5454 { entry . data . title }
5555 </ NavItem >
56- ) ) ;
56+ ) )
5757
5858 return (
5959 < PageSidebar isSidebarOpen = { $isNavOpen } >
@@ -63,5 +63,5 @@ export const Navigation: React.FunctionComponent<NavigationProps> = ({
6363 </ Nav >
6464 </ PageSidebarBody >
6565 </ PageSidebar >
66- ) ;
67- } ;
66+ )
67+ }
0 commit comments