Skip to content

Commit

Permalink
refactor: remove some useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Dec 16, 2021
1 parent 16ce797 commit 7c33f2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
12 changes: 0 additions & 12 deletions packages/docusaurus-theme-classic/src/theme-classic.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,18 +202,6 @@ declare module '@theme/hooks/useHideableNavbar' {
export default useHideableNavbar;
}

declare module '@theme/hooks/useLocationHash' {
import type {Dispatch, SetStateAction} from 'react';

export type useLocationHashReturns = readonly [
string,
Dispatch<SetStateAction<string>>,
];

const useLocationHash: (initialHash: string) => useLocationHashReturns;
export default useLocationHash;
}

declare module '@theme/hooks/useLockBodyScroll' {
const useLockBodyScroll: (lock?: boolean) => void;
export default useLockBodyScroll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function DropdownNavbarItemDesktop({
...props
}: DesktopOrMobileNavBarItemProps) {
const dropdownRef = useRef<HTMLDivElement>(null);
const dropdownMenuRef = useRef<HTMLUListElement>(null);
const [showDropdown, setShowDropdown] = useState(false);

useEffect(() => {
Expand Down Expand Up @@ -98,7 +97,7 @@ function DropdownNavbarItemDesktop({
}}>
{props.children ?? props.label}
</NavLink>
<ul ref={dropdownMenuRef} className="dropdown__menu">
<ul className="dropdown__menu">
{items.map((childItemProps, i) => (
<NavbarItem
isDropdownItem
Expand Down

This file was deleted.

0 comments on commit 7c33f2c

Please sign in to comment.