Browse Source

Fixed shortcut as well

Taichi Masuyama 4 years ago
parent
commit
151e5557b8
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/app/src/components/Hotkeys/Subscribers/CreatePage.jsx

+ 3 - 1
packages/app/src/components/Hotkeys/Subscribers/CreatePage.jsx

@@ -2,14 +2,16 @@ import React, { useEffect } from 'react';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 
 
 import { usePageCreateModal } from '~/stores/modal';
 import { usePageCreateModal } from '~/stores/modal';
+import { useCurrentPagePath } from '~/stores/context';
 
 
 const CreatePage = React.memo((props) => {
 const CreatePage = React.memo((props) => {
 
 
   const { open: openCreateModal } = usePageCreateModal();
   const { open: openCreateModal } = usePageCreateModal();
+  const { data: currentPath = '' } = useCurrentPagePath();
 
 
   // setup effect
   // setup effect
   useEffect(() => {
   useEffect(() => {
-    openCreateModal();
+    openCreateModal(currentPath);
 
 
     // remove this
     // remove this
     props.onDeleteRender(this);
     props.onDeleteRender(this);