mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-08 13:01:10 +02:00
Refetch page after clearing blocklist and refreshing events
This commit is contained in:
parent
6131f1debd
commit
62e5078aeb
2 changed files with 10 additions and 11 deletions
|
|
@ -109,9 +109,10 @@ function BlocklistContent() {
|
|||
const handleClearBlocklistConfirmed = useCallback(() => {
|
||||
executeCommand({ name: CommandNames.ClearBlocklist }, () => {
|
||||
goToPage(1);
|
||||
refetch();
|
||||
});
|
||||
setIsConfirmClearModalOpen(false);
|
||||
}, [setIsConfirmClearModalOpen, goToPage, executeCommand]);
|
||||
}, [setIsConfirmClearModalOpen, executeCommand, goToPage, refetch]);
|
||||
|
||||
const handleConfirmClearModalClose = useCallback(() => {
|
||||
setIsConfirmClearModalOpen(false);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ function LogsTable() {
|
|||
isLoading,
|
||||
page,
|
||||
goToPage,
|
||||
refetch,
|
||||
} = useEvents();
|
||||
|
||||
const { columns, pageSize, sortKey, sortDirection, selectedFilterKey } =
|
||||
|
|
@ -77,18 +78,15 @@ function LogsTable() {
|
|||
|
||||
const handleRefreshPress = useCallback(() => {
|
||||
goToPage(1);
|
||||
}, [goToPage]);
|
||||
refetch();
|
||||
}, [goToPage, refetch]);
|
||||
|
||||
const handleClearLogsPress = useCallback(() => {
|
||||
executeCommand(
|
||||
{
|
||||
name: CommandNames.ClearLog,
|
||||
},
|
||||
() => {
|
||||
goToPage(1);
|
||||
}
|
||||
);
|
||||
}, [executeCommand, goToPage]);
|
||||
executeCommand({ name: CommandNames.ClearLog }, () => {
|
||||
goToPage(1);
|
||||
refetch();
|
||||
});
|
||||
}, [executeCommand, goToPage, refetch]);
|
||||
|
||||
return (
|
||||
<PageContent title={translate('Logs')}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue