import { h, Fragment } from 'preact'; import LinkedLogo from './components/LinkedLogo'; import { Match } from 'preact-router/match'; import { memo } from 'preact/compat'; import { useConfig } from './api'; import NavigationDrawer, { Destination, Separator } from './components/NavigationDrawer'; import { useCallback, useMemo } from 'preact/hooks'; export default function Sidebar() { const { data: config } = useConfig(); const cameras = useMemo(() => Object.keys(config.cameras), [config]); return ( }> {({ matches }) => matches ? ( {cameras.map((camera) => ( ))} ) : null }
); } const Header = memo(function Header() { return (
); });