mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
Merge pull request #1975 from atmonshi/refresh-after-delete-user
small improve to Users List
This commit is contained in:
commit
89d37e0045
@ -18,10 +18,15 @@ export function UsersList() {
|
||||
const { toast, showToast } = useToast();
|
||||
const hasData = data && data.length !== 0;
|
||||
|
||||
const handleSave = () => refetch();
|
||||
const handleSave = () => {
|
||||
refetch().then(() => showToast({ message: formatMessage(messages.saved), variant: 'success' }));
|
||||
};
|
||||
|
||||
const handleDelete = () =>
|
||||
showToast({ message: formatMessage(messages.userDeleted), variant: 'success' });
|
||||
const handleDelete = () => {
|
||||
refetch().then(() =>
|
||||
showToast({ message: formatMessage(messages.userDeleted), variant: 'success' }),
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Page loading={isLoading} error={error}>
|
||||
|
Loading…
Reference in New Issue
Block a user