Skip to content

Commit

Permalink
add cleanup function
Browse files Browse the repository at this point in the history
  • Loading branch information
bosiraphael committed Dec 17, 2024
1 parent 090c539 commit fefcc7d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const ContextStoreCurrentViewTypeEffect = ({

useEffect(() => {
setContextStoreCurrentViewType(viewType);

return () => {
setContextStoreCurrentViewType(null);
};
}, [setContextStoreCurrentViewType, viewType]);

return null;
Expand Down

0 comments on commit fefcc7d

Please sign in to comment.