Преглед изворни кода

Merge pull request #5276 from weseek/revert-5275-feat/87755-using-swr-to-display-duplicate-modal

Revert "feat: 87755 Use SWR to display duplicate modal (search dropdown)"
Shun Miyazawa пре 4 година
родитељ
комит
c423926f4b
1 измењених фајлова са 1 додато и 7 уклоњено
  1. 1 7
      packages/app/src/components/PageList/PageListItemL.tsx

+ 1 - 7
packages/app/src/components/PageList/PageListItemL.tsx

@@ -5,7 +5,7 @@ import { format } from 'date-fns';
 
 import { UserPicture, PageListMeta } from '@growi/ui';
 import { DevidedPagePath } from '@growi/core';
-import { useIsDeviceSmallerThanLg, usePageDuplicateModalStatus } from '~/stores/ui';
+import { useIsDeviceSmallerThanLg } from '~/stores/ui';
 import {
   IPageInfoAll, IPageWithMeta, isIPageInfoForEntity, isIPageInfoForListing,
 } from '~/interfaces/page';
@@ -34,7 +34,6 @@ export const PageListItemL = memo((props: Props): JSX.Element => {
   } = props;
 
   const { data: isDeviceSmallerThanLg } = useIsDeviceSmallerThanLg();
-  const { open: openDuplicateModal } = usePageDuplicateModalStatus();
 
   const elasticSearchResult = isIPageSearchMeta(pageMeta) ? pageMeta.elasticSearchResult : null;
   const revisionShortBody = isIPageInfoForListing(pageMeta) ? pageMeta.revisionShortBody : null;
@@ -57,10 +56,6 @@ export const PageListItemL = memo((props: Props): JSX.Element => {
     }
   }, [isDeviceSmallerThanLg, onClickItem, pageData._id]);
 
-  const onClickDuplicateMenuItem = () => {
-    openDuplicateModal(pageData._id, pageData.path);
-  };
-
   const styleListGroupItem = (!isDeviceSmallerThanLg && onClickCheckbox != null) ? 'list-group-item-action' : '';
   // background color of list item changes when class "active" exists under 'list-group-item'
   const styleActive = !isDeviceSmallerThanLg && isSelected ? 'active' : '';
@@ -122,7 +117,6 @@ export const PageListItemL = memo((props: Props): JSX.Element => {
                   pageInfo={pageMeta}
                   onClickDeleteMenuItem={props.onClickDeleteButton}
                   isEnableActions={isEnableActions}
-                  onClickDuplicateMenuItem={onClickDuplicateMenuItem}
                 />
               </div>
             </div>