forked from Github/frigate
UI tweaks (#11795)
* Prevent "undefined" from being displayed in searchParams string * Show message for no motion data * Use theme colors for no preview found divs
This commit is contained in:
@@ -30,7 +30,7 @@ import {
|
||||
useState,
|
||||
} from "react";
|
||||
import { isDesktop, isMobile } from "react-device-detect";
|
||||
import { LuFolderCheck } from "react-icons/lu";
|
||||
import { LuFolderCheck, LuFolderX } from "react-icons/lu";
|
||||
import { MdCircle } from "react-icons/md";
|
||||
import useSWR from "swr";
|
||||
import MotionReviewTimeline from "@/components/timeline/MotionReviewTimeline";
|
||||
@@ -858,6 +858,15 @@ function MotionReview({
|
||||
],
|
||||
);
|
||||
|
||||
if (motionData?.length === 0) {
|
||||
return (
|
||||
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center text-center">
|
||||
<LuFolderX className="size-16" />
|
||||
No motion data found
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!relevantPreviews) {
|
||||
return <ActivityIndicator />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user