import Link from 'next/link'; import { useRouter } from 'next/router'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import DiscordLogo from '../../assets/extlogos/discord_white.svg'; import SlackLogo from '../../assets/extlogos/slack.svg'; import TelegramLogo from '../../assets/extlogos/telegram.svg'; const messages = defineMessages({ notificationsettings: 'Notification Settings', notificationsettingsDescription: 'Here you can pick and choose what types of notifications to send and through what types of services.', }); interface SettingsRoute { text: string; content: React.ReactNode; route: string; regex: RegExp; } const settingsRoutes: SettingsRoute[] = [ { text: 'Email', content: ( Email ), route: '/settings/notifications/email', regex: /^\/settings\/notifications\/email/, }, { text: 'Discord', content: ( Discord ), route: '/settings/notifications/discord', regex: /^\/settings\/notifications\/discord/, }, { text: 'Slack', content: ( Slack ), route: '/settings/notifications/slack', regex: /^\/settings\/notifications\/slack/, }, { text: 'Telegram', content: ( Telegram ), route: '/settings/notifications/telegram', regex: /^\/settings\/notifications\/telegram/, }, ]; const SettingsNotifications: React.FC = ({ children }) => { const router = useRouter(); const intl = useIntl(); const activeLinkColor = 'bg-indigo-700'; const inactiveLinkColor = 'bg-gray-800'; const SettingsLink: React.FC<{ route: string; regex: RegExp; isMobile?: boolean; }> = ({ children, route, regex, isMobile = false }) => { if (isMobile) { return ; } return ( {children} ); }; return ( <>

{intl.formatMessage(messages.notificationsettings)}

{intl.formatMessage(messages.notificationsettingsDescription)}

{children}
); }; export default SettingsNotifications;