Răsfoiți Sursa

rename pagepath and pagetitle to pagepathheader and pagetitleheader

WNomunomu 2 ani în urmă
părinte
comite
4cc159cd4e

+ 0 - 56
apps/app/src/components/PageHeader/PagePath.tsx

@@ -1,56 +0,0 @@
-import { FC, useState } from 'react';
-
-import type { IPagePopulatedToShowRevision } from '@growi/core';
-
-import { usePageSelectModal } from '~/stores/modal';
-
-import { TextInputForPageTitleAndPath } from './TextInputForPageTitleAndPath';
-
-
-type Props = {
-  currentPagePath: string
-  currentPage: IPagePopulatedToShowRevision
-}
-
-export const PagePath: FC<Props> = (props) => {
-  const { currentPagePath, currentPage } = props;
-
-  const [isRenameInputShown, setRenameInputShown] = useState(false);
-  const [isButtonsShown, setButtonShown] = useState(false);
-
-  const { open: openPageSelectModal, close: closePageSelectModal } = usePageSelectModal();
-
-  const stateHandler = { isRenameInputShown, setRenameInputShown };
-
-  return (
-    <>
-      <div className="container">
-        <div className="row">
-          <div
-            className="col-4"
-            onMouseEnter={() => setButtonShown(true)}
-            onMouseLeave={() => setButtonShown(false)}
-          >
-            <TextInputForPageTitleAndPath
-              currentPagePath={currentPagePath}
-              currentPage={currentPage}
-              stateHandler={stateHandler}
-              inputValue={currentPagePath}
-            />
-          </div>
-          { isButtonsShown
-          && (
-            <>
-              <div className="col-4">
-                <button type="button">編集ボタン</button>
-              </div>
-              <div className="col-4">
-                <button type="button" onClick={openPageSelectModal}>ページツリーボタン</button>
-              </div>
-            </>
-          )}
-        </div>
-      </div>
-    </>
-  );
-};

+ 0 - 30
apps/app/src/components/PageHeader/PageTitle.tsx

@@ -1,30 +0,0 @@
-import { FC, useState } from 'react';
-
-import nodePath from 'path';
-
-import type { IPagePopulatedToShowRevision } from '@growi/core';
-
-import { TextInputForPageTitleAndPath } from './TextInputForPageTitleAndPath';
-
-type Props = {
-  currentPagePath: string,
-  currentPage: IPagePopulatedToShowRevision;
-}
-
-export const PageTitle: FC<Props> = (props) => {
-  const { currentPagePath, currentPage } = props;
-
-  const [isRenameInputShown, setRenameInputShown] = useState(false);
-  const pageName = nodePath.basename(currentPagePath ?? '') || '/';
-
-  const stateHandler = { isRenameInputShown, setRenameInputShown };
-
-  return (
-    <TextInputForPageTitleAndPath
-      currentPagePath={currentPagePath}
-      currentPage={currentPage}
-      stateHandler={stateHandler}
-      inputValue={pageName}
-    />
-  );
-};