Shun Miyazawa %!s(int64=4) %!d(string=hai) anos
pai
achega
c41105f10a
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      packages/app/src/components/PageCreateModal.jsx

+ 4 - 4
packages/app/src/components/PageCreateModal.jsx

@@ -34,8 +34,8 @@ const PageCreateModal = (props) => {
   const isReachable = config.isSearchServiceReachable;
   const pathname = path || '';
   const userPageRootPath = userPageRoot(appContainer.currentUser);
-  const isUserRoot = userPageRootPath === pathname;
-  const pageNameInputInitialValue = isCreatablePage(pathname) || isUserRoot ? pathUtils.addTrailingSlash(pathname) : '/';
+  const isUserPageRoot = userPageRootPath === pathname;
+  const pageNameInputInitialValue = isCreatablePage(pathname) || isUserPageRoot ? pathUtils.addTrailingSlash(pathname) : '/';
   const now = format(new Date(), 'yyyy/MM/dd');
 
   const [todayInput1, setTodayInput1] = useState(t('Memo'));
@@ -46,8 +46,8 @@ const PageCreateModal = (props) => {
 
   // ensure pageNameInput is synced with selectedPagePath || currentPagePath
   useEffect(() => {
-    setPageNameInput(isCreatablePage(pathname) || isUserRoot ? pathUtils.addTrailingSlash(pathname) : '/');
-  }, [pathname, isUserRoot]);
+    setPageNameInput(isCreatablePage(pathname) || isUserPageRoot ? pathUtils.addTrailingSlash(pathname) : '/');
+  }, [pathname, isUserPageRoot]);
 
   const checkIsUsersHomePageDebounce = useMemo(() => {
     const checkIsUsersHomePage = () => {