|
@@ -1,7 +1,7 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
-import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
import { useCreateModalStatus, useIsDeviceSmallerThanMd, useDrawerOpened } from '~/stores/ui';
|
|
import { useCreateModalStatus, useIsDeviceSmallerThanMd, useDrawerOpened } from '~/stores/ui';
|
|
|
|
|
+import { useCurrentPagePath } from '~/stores/context';
|
|
|
|
|
|
|
|
import GlobalSearch from './GlobalSearch';
|
|
import GlobalSearch from './GlobalSearch';
|
|
|
|
|
|
|
@@ -10,6 +10,7 @@ const GrowiNavbarBottom = (props) => {
|
|
|
const { data: isDrawerOpened, mutate: mutateDrawerOpened } = useDrawerOpened();
|
|
const { data: isDrawerOpened, mutate: mutateDrawerOpened } = useDrawerOpened();
|
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
|
const { open: openCreateModal } = useCreateModalStatus();
|
|
const { open: openCreateModal } = useCreateModalStatus();
|
|
|
|
|
+ const { data: currentPagePath } = useCurrentPagePath();
|
|
|
|
|
|
|
|
const additionalClasses = ['grw-navbar-bottom'];
|
|
const additionalClasses = ['grw-navbar-bottom'];
|
|
|
if (isDrawerOpened) {
|
|
if (isDrawerOpened) {
|
|
@@ -53,7 +54,7 @@ const GrowiNavbarBottom = (props) => {
|
|
|
<a
|
|
<a
|
|
|
role="button"
|
|
role="button"
|
|
|
className="nav-link btn-lg"
|
|
className="nav-link btn-lg"
|
|
|
- onClick={() => openCreateModal(true)}
|
|
|
|
|
|
|
+ onClick={() => openCreateModal(currentPagePath || '')}
|
|
|
>
|
|
>
|
|
|
<i className="icon-pencil"></i>
|
|
<i className="icon-pencil"></i>
|
|
|
</a>
|
|
</a>
|