|
@@ -8,7 +8,7 @@ import Link from 'next/link';
|
|
|
import { useUserUISettings } from '~/client/services/user-ui-settings';
|
|
import { useUserUISettings } from '~/client/services/user-ui-settings';
|
|
|
import { SidebarContentsType } from '~/interfaces/ui';
|
|
import { SidebarContentsType } from '~/interfaces/ui';
|
|
|
import {
|
|
import {
|
|
|
- useIsAdmin, useGrowiCloudUri, useIsDefaultLogo, useIsGuestUser,
|
|
|
|
|
|
|
+ useIsAdmin, useGrowiCloudUri, useIsDefaultLogo,
|
|
|
} from '~/stores/context';
|
|
} from '~/stores/context';
|
|
|
import { useCurrentSidebarContents } from '~/stores/ui';
|
|
import { useCurrentSidebarContents } from '~/stores/ui';
|
|
|
|
|
|
|
@@ -22,7 +22,6 @@ import styles from './SidebarNav.module.scss';
|
|
|
const PersonalDropdown = dynamic(() => import('./PersonalDropdown').then(mod => mod.PersonalDropdown), { ssr: false });
|
|
const PersonalDropdown = dynamic(() => import('./PersonalDropdown').then(mod => mod.PersonalDropdown), { ssr: false });
|
|
|
const InAppNotificationDropdown = dynamic(() => import('../InAppNotification/InAppNotificationDropdown')
|
|
const InAppNotificationDropdown = dynamic(() => import('../InAppNotification/InAppNotificationDropdown')
|
|
|
.then(mod => mod.InAppNotificationDropdown), { ssr: false });
|
|
.then(mod => mod.InAppNotificationDropdown), { ssr: false });
|
|
|
-const AppearanceModeDropdown = dynamic(() => import('./AppearanceModeDropdown').then(mod => mod.AppearanceModeDropdown), { ssr: false });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type PrimaryItemProps = {
|
|
type PrimaryItemProps = {
|
|
@@ -96,14 +95,11 @@ type Props = {
|
|
|
|
|
|
|
|
export const SidebarNav: FC<Props> = (props: Props) => {
|
|
export const SidebarNav: FC<Props> = (props: Props) => {
|
|
|
const { data: isAdmin } = useIsAdmin();
|
|
const { data: isAdmin } = useIsAdmin();
|
|
|
- const { data: isGuestUser } = useIsGuestUser();
|
|
|
|
|
const { data: growiCloudUri } = useGrowiCloudUri();
|
|
const { data: growiCloudUri } = useGrowiCloudUri();
|
|
|
const { data: isDefaultLogo } = useIsDefaultLogo();
|
|
const { data: isDefaultLogo } = useIsDefaultLogo();
|
|
|
|
|
|
|
|
const { onItemSelected } = props;
|
|
const { onItemSelected } = props;
|
|
|
|
|
|
|
|
- const isAuthenticated = isGuestUser === false;
|
|
|
|
|
-
|
|
|
|
|
return (
|
|
return (
|
|
|
<div className={`grw-sidebar-nav ${styles['grw-sidebar-nav']}`}>
|
|
<div className={`grw-sidebar-nav ${styles['grw-sidebar-nav']}`}>
|
|
|
{/* Brand Logo */}
|
|
{/* Brand Logo */}
|
|
@@ -123,8 +119,6 @@ export const SidebarNav: FC<Props> = (props: Props) => {
|
|
|
<InAppNotificationDropdown />
|
|
<InAppNotificationDropdown />
|
|
|
</div>
|
|
</div>
|
|
|
<div className="grw-sidebar-nav-secondary-container">
|
|
<div className="grw-sidebar-nav-secondary-container">
|
|
|
- {/* TODO: This setting will be consolidated in "Settings" on My Page, so delete it from here. */}
|
|
|
|
|
- {/* <AppearanceModeDropdown isAuthenticated={isAuthenticated} /> */}
|
|
|
|
|
<PersonalDropdown />
|
|
<PersonalDropdown />
|
|
|
<SecondaryItem label="Help" iconName="help" href={growiCloudUri != null ? 'https://growi.cloud/help/' : 'https://docs.growi.org'} isBlank />
|
|
<SecondaryItem label="Help" iconName="help" href={growiCloudUri != null ? 'https://growi.cloud/help/' : 'https://docs.growi.org'} isBlank />
|
|
|
{isAdmin && <SecondaryItem label="Admin" iconName="settings" href="/admin" />}
|
|
{isAdmin && <SecondaryItem label="Admin" iconName="settings" href="/admin" />}
|