Shun Miyazawa 3 лет назад
Родитель
Сommit
257072e77c
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      packages/app/src/components/Admin/AuditLogManagement.tsx

+ 5 - 0
packages/app/src/components/Admin/AuditLogManagement.tsx

@@ -3,6 +3,7 @@ import React, { FC, useState, useCallback } from 'react';
 import { format } from 'date-fns';
 import { useTranslation } from 'react-i18next';
 
+import { toastError } from '~/client/util/apiNotification';
 import { SupportedActionType } from '~/interfaces/activity';
 import { useSWRxActivity } from '~/stores/activity';
 import { useAuditLogEnabled, useAuditLogAvailableActions } from '~/stores/context';
@@ -57,6 +58,10 @@ export const AuditLogManagement: FC = () => {
   const totalActivityNum = activityData?.totalDocs != null ? activityData.totalDocs : 0;
   const isLoading = activityData === undefined && error == null;
 
+  if (error != null) {
+    toastError('Failed to get Audit Log');
+  }
+
   const { data: auditLogEnabled } = useAuditLogEnabled();
 
   /*