SearchResultSubNavButton.tsx 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React, {
  2. FC, useState, useEffect,
  3. } from 'react';
  4. import AppContainer from '../../client/services/AppContainer';
  5. import { withUnstatedContainers } from '../UnstatedUtils';
  6. import PageReactionButtons from '../PageReactionButtons';
  7. import PageManagement from '../Page/PageManagement';
  8. import { apiv3Get } from '../../client/util/apiv3-client';
  9. type Props = {
  10. appContainer: AppContainer,
  11. isCompactMode: boolean,
  12. pageId: string,
  13. }
  14. const SearchResultSubNavButton : FC<Props> = (props: Props) => {
  15. const {
  16. appContainer, isCompactMode, pageId,
  17. } = props;
  18. if (pageId == null) return;
  19. const PageReactionButtonsTypeAny : any = PageReactionButtons;
  20. return (
  21. <>
  22. <PageReactionButtonsTypeAny pageId={pageId} currentUserId={appContainer.currentUserId}></PageReactionButtonsTypeAny>
  23. {/*
  24. TODO :
  25. once 80335 is done, merge 77543 branch(parent of 80335) into 77524.
  26. (pageContainer dependencies in bookmark, delete modal, rename etc are removed)
  27. then place PageManagement here.
  28. TASK: https://estoc.weseek.co.jp/redmine/issues/81076
  29. CONDITION :isAbleToShowPageManagement = !isNotFoundPage && !isTrashPage && !isSharedUser
  30. */}
  31. {/* if (CONDITION) then PageManagement */}
  32. </>
  33. );
  34. };
  35. const SearchResultSubNavButtonWrapper = withUnstatedContainers(SearchResultSubNavButton, [AppContainer]);
  36. export default SearchResultSubNavButtonWrapper;