mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 11:36:37 +00:00
Update src/components/UI/docs/DocsNav.tsx
Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com>
This commit is contained in:
parent
d7ea2df124
commit
62aff31a2e
1 changed files with 3 additions and 5 deletions
|
|
@ -17,12 +17,10 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DocsNav: FC<Props> = ({ navLinks }) => {
|
export const DocsNav: FC<Props> = ({ navLinks }) => {
|
||||||
const OPEN = 0;
|
const [isMobileAccordionOpen, setIsMobileAccordionOpen] = useState(false)
|
||||||
const CLOSED = -1;
|
|
||||||
const [mobileAccordionState, setMobileAccordionState] = useState(CLOSED)
|
|
||||||
|
|
||||||
const updateMobileAccordionState = () => {
|
const toggleMobileAccordion = () => {
|
||||||
setMobileAccordionState(mobileAccordionState === OPEN ? CLOSED : OPEN)
|
setMobileAccordionState(prev => !prev)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue