fix: favorites not refreshing after navigating back from search (#138)

Co-authored-by: Abdullah Atta <thecodrr@protonmail.com>
This commit is contained in:
Muhammad Ali
2020-03-17 12:40:55 +05:00
committed by GitHub
parent 17d76dc990
commit 46241ce089

View File

@@ -8,15 +8,7 @@ import { DEFAULT_CONTEXT } from "../common";
const Notes = props => {
const newSession = useStore(store => store.newSession);
const selectedNotes = useNotesStore(store => store.selectedNotes);
const clearSelectedContext = useNotesStore(
store => store.clearSelectedContext
);
const selectedContext = useNotesStore(store => store.selectedContext);
useEffect(() => {
return () => {
clearSelectedContext();
};
}, [clearSelectedContext]);
return (
<ListContainer
type="notes"