diff --git a/components/icon-button.tsx b/components/icon-button.tsx index a42d57b5b..48ebfc48a 100644 --- a/components/icon-button.tsx +++ b/components/icon-button.tsx @@ -18,6 +18,7 @@ import { ExternalLinkIcon, BookmarkAltIcon, PuzzleIcon, + ChevronDoubleUpIcon } from '@heroicons/react/outline' export const ICONS = { @@ -38,6 +39,7 @@ export const ICONS = { ExternalLink: ExternalLinkIcon, BookmarkAlt: BookmarkAltIcon, Puzzle: PuzzleIcon, + ChevronDoubleUp: ChevronDoubleUpIcon, } const IconButton = forwardRef< diff --git a/components/note-nav.tsx b/components/note-nav.tsx index 7ea41753a..bfcd884ef 100644 --- a/components/note-nav.tsx +++ b/components/note-nav.tsx @@ -12,6 +12,7 @@ import PortalState from 'libs/web/state/portal' import { NOTE_SHARED } from 'libs/shared/meta' import useI18n from 'libs/web/hooks/use-i18n' import NavButtonGroup from './nav-button-group' +import { EyeIcon } from '@heroicons/react/outline' const MenuButton = () => { const { sidebar } = UIState.useContainer() @@ -37,7 +38,7 @@ const NoteNav = () => { const { t } = useI18n() const { note, loading } = NoteState.useContainer() const { ua } = UIState.useContainer() - const { getPaths } = NoteTreeState.useContainer() + const { getPaths, showItem, checkItemIsShown } = NoteTreeState.useContainer() const { share, menu } = PortalState.useContainer() const handleClickShare = useCallback( @@ -58,6 +59,11 @@ const NoteNav = () => { [note, menu] ) + const handleClickOpenInTree = useCallback(() => { + if (!note) return + showItem(note); + }, [note, showItem]) + return (