import { memo } from 'react'; import dynamic from 'next/dynamic'; import { SidebarContentsType } from '~/interfaces/ui'; import { useSidebarMode } from '~/stores/ui'; import { PrimaryItem } from './PrimaryItem'; import styles from './PrimaryItems.module.scss'; // Do not SSR Socket.io to make it work const PrimaryItemForNotification = dynamic( () => import('../InAppNotification/PrimaryItemForNotification').then(mod => mod.PrimaryItemForNotification), { ssr: false }, ); type Props = { onItemHover?: (contents: SidebarContentsType) => void, } export const PrimaryItems = memo((props: Props) => { const { onItemHover } = props; const { data: sidebarMode } = useSidebarMode(); if (sidebarMode == null) { return <>; } return (
); });