test(web): add eslint and PR lint validation

This commit is contained in:
Paul Armstrong
2021-02-09 11:35:33 -08:00
committed by Blake Blackshear
parent 513a099c24
commit daa759cc55
33 changed files with 5190 additions and 505 deletions

View File

@@ -2,19 +2,15 @@ import { h } from 'preact';
import ActivityIndicator from '../components/ActivityIndicator';
import Card from '../components/Card';
import CameraImage from '../components/CameraImage';
import Heading from '../components/Heading';
import { route } from 'preact-router';
import { useConfig } from '../api';
import { useConfig, FetchStatus } from '../api';
import { useMemo } from 'preact/hooks';
export default function Cameras() {
const { data: config, status } = useConfig();
if (!config) {
return <p>loading</p>;
}
return (
return status !== FetchStatus.LOADED ? (
<ActivityIndicator />
) : (
<div className="grid grid-cols-1 3xl:grid-cols-3 md:grid-cols-2 gap-4">
{Object.keys(config.cameras).map((camera) => (
<Camera name={camera} />