import { CheckIcon } from '@radix-ui/react-icons'; import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { useModule, useStatus } from '../../lib/react-utils'; import apiReducer, { modules } from '../../store/api/reducer'; import DefinitionTable from '../components/DefinitionTable'; import SaveButton from '../components/utils/SaveButton'; import { Checkbox, CheckboxIndicator, Field, FieldNote, FlexRow, InputBox, Label, PageContainer, PageHeader, PageTitle, SectionHeader, styled, TabButton, TabContainer, TabContent, TabList, TextBlock, } from '../theme'; const StepList = styled('ul', { lineHeight: '1.5', listStyleType: 'none', listStylePosition: 'outside', }); const Step = styled('li', { marginBottom: '0.5rem', paddingLeft: '1rem', '&::marker': { color: '$teal11', content: '▧', display: 'inline-block', marginLeft: '-0.5rem', }, }); function TwitchBotSettings() { const [botConfig, setBotConfig, loadStatus] = useModule( modules.twitchBotConfig, ); const [twitchConfig, setTwitchConfig] = useModule(modules.twitchConfig); const status = useStatus(loadStatus.save); const dispatch = useDispatch(); const { t } = useTranslation(); const active = twitchConfig?.enable_bot ?? false; return (
); } function TwitchAPISettings() { const { t } = useTranslation(); const [httpConfig] = useModule(modules.httpConfig); const [twitchConfig, setTwitchConfig, loadStatus] = useModule( modules.twitchConfig, ); const status = useStatus(loadStatus.save); const dispatch = useDispatch(); return ( ); } export default function TwitchSettingsPage(): React.ReactElement { const { t } = useTranslation(); const [twitchConfig, setTwitchConfig] = useModule(modules.twitchConfig); const dispatch = useDispatch(); const active = twitchConfig?.enabled ?? false; return (