fix(lists): toggle toast message (#1897)

fix(web): invert list toggle state in toast message
This commit is contained in:
soup 2024-12-26 14:59:56 +01:00 committed by GitHub
parent 0cf704dba3
commit c1c97d2d97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ function ListItem({ list }: ListItemProps) {
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ListKeys.lists() }); queryClient.invalidateQueries({ queryKey: ListKeys.lists() });
toast.custom(t => <Toast type="success" body={`List ${list.name} was ${list.enabled ? "enabled" : "disabled"} successfully.`} t={t} />); toast.custom(t => <Toast type="success" body={`List ${list.name} was ${list.enabled ? "disabled" : "enabled"} successfully.`} t={t} />);
}, },
onError: () => { onError: () => {
toast.custom((t) => <Toast type="error" body="List state could not be updated" t={t} />); toast.custom((t) => <Toast type="error" body="List state could not be updated" t={t} />);