69 | {isConnecting ?
{'Connecting...'}
:
{'Connected!'}
}
70 |
71 | {logBuffer.length === 0 &&
{i18n.t('awaitingLogs')}
}
72 |
73 | {logBuffer.map((log, idx) => (
74 |
75 | {log}
76 |
77 | ))}
78 |
79 |
80 | )
81 | }
82 |
83 | export default LogTerminal
--------------------------------------------------------------------------------
/frontend/src/views/Twitch.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Chip,
3 | Container,
4 | Paper
5 | } from '@mui/material'
6 | import { matchW } from 'fp-ts/lib/Either'
7 | import { pipe } from 'fp-ts/lib/function'
8 | import { useAtomValue } from 'jotai'
9 | import { useState, useTransition } from 'react'
10 | import { serverURL } from '../atoms/settings'
11 | import LoadingBackdrop from '../components/LoadingBackdrop'
12 | import NoSubscriptions from '../components/subscriptions/NoSubscriptions'
13 | import SubscriptionsSpeedDial from '../components/subscriptions/SubscriptionsSpeedDial'
14 | import TwitchDialog from '../components/twitch/TwitchDialog'
15 | import { useToast } from '../hooks/toast'
16 | import useFetch from '../hooks/useFetch'
17 | import { ffetch } from '../lib/httpClient'
18 |
19 | const TwitchView: React.FC = () => {
20 | const { pushMessage } = useToast()
21 |
22 | const baseURL = useAtomValue(serverURL)
23 |
24 | const [openDialog, setOpenDialog] = useState(false)
25 |
26 | const { data: users, fetcher: refetch } = useFetch