mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
fix(filters): correct toasts for enabling and disabling filters (#912)
correct toasts for enabling and disabling filters
This commit is contained in:
parent
8a1910843c
commit
7817e85621
1 changed files with 1 additions and 2 deletions
|
@ -652,8 +652,7 @@ function FilterListItem({ filter, values, idx }: FilterListItemProps) {
|
|||
const updateMutation = useMutation({
|
||||
mutationFn: (status: boolean) => APIClient.filters.toggleEnable(filter.id, status),
|
||||
onSuccess: () => {
|
||||
toast.custom((t) => <Toast type="success" body={`${filter.name} was ${!filter.enabled ? "disabled" : "enabled"} successfully`} t={t} />);
|
||||
|
||||
toast.custom((t) => <Toast type="success" body={`${filter.name} was ${filter.enabled ? "disabled" : "enabled"} successfully`} t={t} />);
|
||||
// We need to invalidate both keys here.
|
||||
// The filters key is used on the /filters page,
|
||||
// while the ["filter", filter.id] key is used on the details page.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue