import { useTranslation } from 'react-i18next' import RadioButtonSetting, { RadioOption } from '../radio-button-setting' import { SettableNotificationLevel, useProjectNotificationPreferences, } from '../../hooks/use-project-notification-preferences' import BetaBadgeIcon from '@/shared/components/beta-badge-icon' import LoadingSpinner from '@/shared/components/loading-spinner' export default function ProjectNotificationsSetting() { const { t } = useTranslation() const { notificationLevel, setNotificationLevel, isLoading } = useProjectNotificationPreferences() if (isLoading) { return } const options: Array> = [ { value: 'all', label: t('all_project_activity'), description: t('all_project_activity_description'), }, { value: 'replies', label: t('replies_to_your_activity_only'), description: t('replies_to_your_activity_only_description'), }, { value: 'off', label: t('off'), description: t('no_project_notifications_description'), }, ] return ( <> {notificationLevel === 'global-off' ? (
{t('project_notifications_muted_description')}{' '} {t('change_settings')}
) : ( <>
{t('manage_overleaf_email_preferences')}
{t('email_notifications_are_currently_in_beta')}{' '} {t('these_settings_might_change_in_the_future')}{' '} {t('give_feedback')}
)} ) }