Update src/components/UI/docs/DocsNav.tsx

Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com>
This commit is contained in:
Corwin Smith 2022-12-12 11:58:30 -07:00 committed by GitHub
parent d7ea2df124
commit 62aff31a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -17,12 +17,10 @@ interface Props {
}
export const DocsNav: FC<Props> = ({ navLinks }) => {
const OPEN = 0;
const CLOSED = -1;
const [mobileAccordionState, setMobileAccordionState] = useState(CLOSED)
const [isMobileAccordionOpen, setIsMobileAccordionOpen] = useState(false)
const updateMobileAccordionState = () => {
setMobileAccordionState(mobileAccordionState === OPEN ? CLOSED : OPEN)
const toggleMobileAccordion = () => {
setMobileAccordionState(prev => !prev)
}
return (