|
@@ -4,18 +4,16 @@ import React, {
|
|
|
|
|
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import dynamic from 'next/dynamic';
|
|
import dynamic from 'next/dynamic';
|
|
|
-import Link from 'next/link';
|
|
|
|
|
import { useRipple } from 'react-use-ripple';
|
|
import { useRipple } from 'react-use-ripple';
|
|
|
import { UncontrolledTooltip } from 'reactstrap';
|
|
import { UncontrolledTooltip } from 'reactstrap';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
- useIsSearchPage, useIsGuestUser, useIsReadOnlyUser, useIsSearchServiceConfigured, useAppTitle, useConfidential, useIsDefaultLogo,
|
|
|
|
|
|
|
+ useIsSearchPage, useIsGuestUser, useIsReadOnlyUser, useIsSearchServiceConfigured, useAppTitle, useConfidential,
|
|
|
} from '~/stores/context';
|
|
} from '~/stores/context';
|
|
|
import { usePageCreateModal } from '~/stores/modal';
|
|
import { usePageCreateModal } from '~/stores/modal';
|
|
|
import { useCurrentPagePath } from '~/stores/page';
|
|
import { useCurrentPagePath } from '~/stores/page';
|
|
|
import { useIsDeviceSmallerThanMd } from '~/stores/ui';
|
|
import { useIsDeviceSmallerThanMd } from '~/stores/ui';
|
|
|
|
|
|
|
|
-import GrowiLogo from '../Icons/GrowiLogo';
|
|
|
|
|
|
|
|
|
|
import { GlobalSearchProps } from './GlobalSearch';
|
|
import { GlobalSearchProps } from './GlobalSearch';
|
|
|
|
|
|
|
@@ -121,21 +119,6 @@ const Confidential: FC<ConfidentialProps> = memo((props: ConfidentialProps): JSX
|
|
|
});
|
|
});
|
|
|
Confidential.displayName = 'Confidential';
|
|
Confidential.displayName = 'Confidential';
|
|
|
|
|
|
|
|
-interface NavbarLogoProps {
|
|
|
|
|
- isDefaultLogo?: boolean
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const GrowiNavbarLogo: FC<NavbarLogoProps> = memo((props: NavbarLogoProps) => {
|
|
|
|
|
- const { isDefaultLogo } = props;
|
|
|
|
|
-
|
|
|
|
|
- return isDefaultLogo
|
|
|
|
|
- ? <GrowiLogo />
|
|
|
|
|
- // eslint-disable-next-line @next/next/no-img-element
|
|
|
|
|
- : (<img src='/attachment/brand-logo' alt="custom logo" className="picture picture-lg p-2 mx-2" id="settingBrandLogo" width="32" />);
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-GrowiNavbarLogo.displayName = 'GrowiNavbarLogo';
|
|
|
|
|
-
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
isGlobalSearchHidden?: boolean
|
|
isGlobalSearchHidden?: boolean
|
|
|
}
|
|
}
|
|
@@ -151,16 +134,9 @@ export const GrowiNavbar = (props: Props): JSX.Element => {
|
|
|
const { data: isSearchServiceConfigured } = useIsSearchServiceConfigured();
|
|
const { data: isSearchServiceConfigured } = useIsSearchServiceConfigured();
|
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
|
|
|
const { data: isSearchPage } = useIsSearchPage();
|
|
const { data: isSearchPage } = useIsSearchPage();
|
|
|
- const { data: isDefaultLogo } = useIsDefaultLogo();
|
|
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<nav id="grw-navbar" className={`navbar grw-navbar ${styles['grw-navbar']} navbar-expand navbar-dark sticky-top mb-0 px-0`}>
|
|
<nav id="grw-navbar" className={`navbar grw-navbar ${styles['grw-navbar']} navbar-expand navbar-dark sticky-top mb-0 px-0`}>
|
|
|
- {/* Brand Logo */}
|
|
|
|
|
- <div className="navbar-brand mr-0">
|
|
|
|
|
- <Link href="/" className="grw-logo d-block">
|
|
|
|
|
- <GrowiNavbarLogo isDefaultLogo={isDefaultLogo} />
|
|
|
|
|
- </Link>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
<div className="grw-app-title d-none d-md-block">
|
|
<div className="grw-app-title d-none d-md-block">
|
|
|
{appTitle}
|
|
{appTitle}
|