mirror of
https://github.com/usememos/memos.git
synced 2025-09-13 17:24:27 +08:00
fix: initial memo filter
This commit is contained in:
parent
6b538cd43d
commit
8887eecf07
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,8 @@ interface FilterProps {}
|
|||
|
||||
const MemoFilter: React.FC<FilterProps> = () => {
|
||||
const query = useAppSelector((state) => state.location.query);
|
||||
const { tag: tagQuery, duration, type: memoType, text: textQuery, shortcutId } = query ?? {};
|
||||
useAppSelector((state) => state.shortcut.shortcuts);
|
||||
const { tag: tagQuery, duration, type: memoType, text: textQuery, shortcutId } = query;
|
||||
const shortcut = shortcutId ? shortcutService.getShortcutById(shortcutId) : null;
|
||||
const showFilter = Boolean(tagQuery || (duration && duration.from < duration.to) || memoType || textQuery || shortcut);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue