mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
Stop autoplay on open
This commit is contained in:
parent
19ba92bbe3
commit
7ad7dafdab
@ -33,10 +33,6 @@ function History() {
|
|||||||
return ["timeline/hourly", { timezone, limit: API_LIMIT }];
|
return ["timeline/hourly", { timezone, limit: API_LIMIT }];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const shouldAutoPlay = useMemo(() => {
|
|
||||||
return window.innerWidth < 480;
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: timelinePages,
|
data: timelinePages,
|
||||||
size,
|
size,
|
||||||
@ -51,11 +47,13 @@ function History() {
|
|||||||
{ revalidateOnFocus: false }
|
{ revalidateOnFocus: false }
|
||||||
);
|
);
|
||||||
|
|
||||||
const [detailLevel, _] = useState<"normal" | "extra" | "full">(
|
const [detailLevel, _] = useState<"normal" | "extra" | "full">("normal");
|
||||||
"normal"
|
|
||||||
);
|
|
||||||
const [playback, setPlayback] = useState<Card | undefined>();
|
const [playback, setPlayback] = useState<Card | undefined>();
|
||||||
|
|
||||||
|
const shouldAutoPlay = useMemo(() => {
|
||||||
|
return playback == undefined && window.innerWidth < 480;
|
||||||
|
}, [playback]);
|
||||||
|
|
||||||
const timelineCards: CardsData | never[] = useMemo(() => {
|
const timelineCards: CardsData | never[] = useMemo(() => {
|
||||||
if (!timelinePages) {
|
if (!timelinePages) {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user