import { h } from 'preact'; import ActivityIndicator from './components/ActivityIndicator'; import Box from './components/Box'; import CameraImage from './components/CameraImage'; import Events from './Events'; import Heading from './components/Heading'; import { route } from 'preact-router'; import { useConfig } from './api'; export default function Cameras() { const { data: config, status } = useConfig(); if (!config) { return

loading…

; } return (
{Object.keys(config.cameras).map((camera) => ( ))}
); } function Camera({ name }) { const href = `/cameras/${name}`; return ( {name} ); }