kosei-n 2 лет назад
Родитель
Сommit
8a4cccfab7
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      apps/app/src/components/PageHeader/PageTitleHeader.tsx

+ 2 - 4
apps/app/src/components/PageHeader/PageTitleHeader.tsx

@@ -1,5 +1,5 @@
 import type { FC } from 'react';
 import type { FC } from 'react';
-import { useState, useMemo } from 'react';
+import { useState, useMemo, useEffect } from 'react';
 
 
 import nodePath from 'path';
 import nodePath from 'path';
 
 
@@ -41,9 +41,7 @@ export const PageTitleHeader: FC<Props> = (props) => {
   };
   };
 
 
   const onBlurHandler = () => {
   const onBlurHandler = () => {
-    if (pageName === inputText) {
-      setRenameInputShown(false);
-    }
+    pagePathRenameHandler(inputText);
   };
   };
 
 
   const buttonStyle = isRenameInputShown ? '' : 'd-none';
   const buttonStyle = isRenameInputShown ? '' : 'd-none';