import { h } from 'preact'; import Heading from '../components/Heading'; import { useEffect, useState } from 'preact/hooks'; import ButtonsTabbed from '../components/ButtonsTabbed'; import useSWR from 'swr'; import Button from '../components/Button'; export default function Logs() { const [logService, setLogService] = useState('frigate'); const { data: frigateLogs } = useSWR('logs/frigate'); const { data: go2rtcLogs } = useSWR('logs/go2rtc'); const { data: nginxLogs } = useSWR('logs/nginx'); return (
Logs
{logService == 'frigate' ? frigateLogs : (logService == 'go2rtc' ? go2rtcLogs : nginxLogs)}
); }