Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Oct 23, 2024
1 parent ad16d43 commit 6e3d229
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type ChatsProviderProps = {
const ChatsProvider = ({ children }: ChatsProviderProps) => {
const [filtersQuery, setFiltersQuery] = useLocalStorage('conversationsQuery', initialValues);
const displayFilters = useDisplayFilters(filtersQuery);
const hasAppliedFilters = Object.values(displayFilters).filter((value) => value !== undefined).length > 0;

const resetFiltersQuery = useCallback(
() =>
Expand Down Expand Up @@ -41,9 +40,9 @@ const ChatsProvider = ({ children }: ChatsProviderProps) => {
resetFiltersQuery,
displayFilters,
removeFilter,
hasAppliedFilters,
hasAppliedFilters: Object.values(displayFilters).filter((value) => value !== undefined).length > 0,
}),
[displayFilters, filtersQuery, hasAppliedFilters, removeFilter, resetFiltersQuery, setFiltersQuery],
[displayFilters, filtersQuery, removeFilter, resetFiltersQuery, setFiltersQuery],
);

return <ChatsContext.Provider children={children} value={contextValue} />;
Expand Down

0 comments on commit 6e3d229

Please sign in to comment.