Shun Miyazawa 3 лет назад
Родитель
Сommit
15e9164a50

+ 3 - 3
packages/app/src/components/Admin/AuditLog/SelectActionDropdown.tsx

@@ -3,7 +3,7 @@ import React, { FC, useCallback } from 'react';
 import { SupportedActionType } from '~/interfaces/activity';
 
 type Props = {
-  dropdownItems: Array<{actionType: string, actionNames: SupportedActionType[]}>
+  dropdownItems: Array<{actionCategory: string, actionNames: SupportedActionType[]}>
   actionMap: Map<SupportedActionType, boolean>
   onSelectAction: (action: SupportedActionType) => void
   onSelectAllACtion: (actions: SupportedActionType[], isChecked: boolean) => void
@@ -34,7 +34,7 @@ export const SelectActionDropdown: FC<Props> = (props: Props) => {
         </button>
         <ul className="dropdown-menu" aria-labelledby="dropdownMenuButton">
           {dropdownItems.map(item => (
-            <div key={item.actionType}>
+            <div key={item.actionCategory}>
               <div className="dropdown-item">
                 <div className="form-group px-2 m-0">
                   <input
@@ -43,7 +43,7 @@ export const SelectActionDropdown: FC<Props> = (props: Props) => {
                     defaultChecked
                     onChange={(e) => { selectAllActionCheckboxChangedHandler(item.actionNames, e.target.checked) }}
                   />
-                  <label className="form-check-label">{item.actionType}</label>
+                  <label className="form-check-label">{item.actionCategory}</label>
                 </div>
               </div>
               {

+ 4 - 4
packages/app/src/components/Admin/AuditLogManagement.tsx

@@ -43,7 +43,7 @@ export const AuditLogManagement: FC = () => {
   /*
    * Functions
    */
-  const setActivePageBySelectedPageNum = useCallback((selectedPageNum: number) => {
+  const setActivePageHandler = useCallback((selectedPageNum: number) => {
     setActivePage(selectedPageNum);
   }, []);
 
@@ -62,8 +62,8 @@ export const AuditLogManagement: FC = () => {
 
       <SelectActionDropdown
         dropdownItems={[
-          { actionType: 'Page', actionNames: AllSupportedPageAction },
-          { actionType: 'Comment', actionNames: AllSupportedCommentAction },
+          { actionCategory: 'Page', actionNames: AllSupportedPageAction },
+          { actionCategory: 'Comment', actionNames: AllSupportedCommentAction },
         ]}
         actionMap={actionMap}
         onSelectAction={selectActionCheckboxChangedHandler}
@@ -81,7 +81,7 @@ export const AuditLogManagement: FC = () => {
             <ActivityTable activityList={activityList} />
             <PaginationWrapper
               activePage={activePage}
-              changePage={setActivePageBySelectedPageNum}
+              changePage={setActivePageHandler}
               totalItemsCount={totalActivityNum}
               pagingLimit={PAGING_LIMIT}
               align="center"