WNomunomu 2 лет назад
Родитель
Сommit
3a1fd846b0
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      apps/app/src/components/PageHeader/PagePathHeader.tsx

+ 6 - 2
apps/app/src/components/PageHeader/PagePathHeader.tsx

@@ -44,7 +44,7 @@ export const PagePathHeader: FC<Props> = (props) => {
         )}
         )}
       </>
       </>
     );
     );
-  }, []);
+  }, [currentPage._id, currentPagePath, isEditorMode]);
 
 
   return (
   return (
     <>
     <>
@@ -67,7 +67,11 @@ export const PagePathHeader: FC<Props> = (props) => {
           && (
           && (
             <>
             <>
               <div className="col-4">
               <div className="col-4">
-                <button type="button" onClick={() => setRenameInputShown(true)}>編集ボタン</button>
+                {
+                  isRenameInputShown
+                    ? <button type="button" onClick={() => setRenameInputShown(false)}>完了ボタン</button>
+                    : <button type="button" onClick={() => setRenameInputShown(true)}>編集ボタン</button>
+                }
               </div>
               </div>
               <div className="col-4">
               <div className="col-4">
                 <button type="button" onClick={openPageSelectModal}>ページツリーボタン</button>
                 <button type="button" onClick={openPageSelectModal}>ページツリーボタン</button>