Skip to content

Commit

Permalink
fix: delete unnecessary hook useShortenedTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Bagautdinov committed Sep 1, 2024
1 parent 04ce820 commit 81a4351
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 92 deletions.
5 changes: 3 additions & 2 deletions src/components/SubNavigation/SubNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ const SubNavigation = memo(
toggleMenuOpen,
}: SubNavigationProps) => {
const visible = useVisibility(miniTocOpened, menuOpened);
// const displayedTitle = useShortenedTitle(title, hideBurger);
const shareHandler = useShareHandler(title, router);

const miniTocHandler = useMemo(() => {
if (hideMiniToc || menuOpened) return () => {};
if (hideMiniToc || menuOpened) {
return () => {};
}

return toggleMiniTocOpen;
}, [hideMiniToc, menuOpened, toggleMiniTocOpen]);
Expand Down
1 change: 0 additions & 1 deletion src/components/SubNavigation/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export {default as useShareHandler} from './useShareHandler';
export {default as useVisibility} from './useVisibility';
export {default as useShortenedTitle} from './useShortenedTitle';
89 changes: 0 additions & 89 deletions src/components/SubNavigation/hooks/useShortenedTitle.ts

This file was deleted.

0 comments on commit 81a4351

Please sign in to comment.