feat(web): auto-paginate events page

This commit is contained in:
Paul Armstrong
2021-01-26 07:04:03 -08:00
committed by Blake Blackshear
parent 40d5a9f890
commit e6516235fa
17 changed files with 424 additions and 161 deletions

View File

@@ -1,10 +1,10 @@
import { h } from 'preact';
import { ApiHost, Config } from '../context';
import { useApiHost, useConfig } from '../api';
import { useCallback, useEffect, useContext, useMemo, useRef, useState } from 'preact/hooks';
export default function CameraImage({ camera, onload, searchParams = '' }) {
const config = useContext(Config);
const apiHost = useContext(ApiHost);
const { data: config } = useConfig();
const apiHost = useApiHost();
const [availableWidth, setAvailableWidth] = useState(0);
const [loadedSrc, setLoadedSrc] = useState(null);
const containerRef = useRef(null);