import { ContentType } from "@/types" import { FC } from "react" import { TabsTrigger } from "../ui/tabs" import { WithTooltip } from "../ui/with-tooltip" import { useTranslation } from 'react-i18next' interface SidebarSwitchItemProps { contentType: ContentType icon: React.ReactNode onContentTypeChange: (contentType: ContentType) => void } export const SidebarSwitchItem: FC = ({ contentType, icon, onContentTypeChange }) => { const { t } = useTranslation() return ( {contentType[0].toUpperCase() + contentType.substring(1)} // } display={
{t(`contentType.${contentType}`)}
} trigger={ onContentTypeChange(contentType as ContentType)} > {icon} } /> ) }