Browse Source

create complete button

WNomunomu 2 years ago
parent
commit
3a1fd846b0
1 changed files with 6 additions and 2 deletions
  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 (
     <>
@@ -67,7 +67,11 @@ export const PagePathHeader: FC<Props> = (props) => {
           && (
             <>
               <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 className="col-4">
                 <button type="button" onClick={openPageSelectModal}>ページツリーボタン</button>