Skip to content

Commit

Permalink
fix: initial memo filter
Browse files Browse the repository at this point in the history
  • Loading branch information
boojack committed May 22, 2022
1 parent 6b538cd commit 8887eec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/MemoFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8887eec

Please sign in to comment.