blakeblackshear.frigate/web/src/components/indicators/ImageLoadingIndicator.tsx
Nicolas Mowen 1377d33e25
Redesign Recordings View (#10690)
* Use full width top bar

* Make each item in review filter group optional

* Remove export creation from export page

* Consolidate packages and fix opening recording from event

* Use common type for time range

* Move timeline to separate component

* Add events list view to recordings view

* Fix loading of images

* Fix incorrect labels

* use overlay state for selected timeline type

* Fix up for mobile view for now

* replace overlay state

* fix comparison

* remove unused
2024-03-26 15:03:58 -06:00

21 lines
440 B
TypeScript

import { isSafari } from "react-device-detect";
import { Skeleton } from "../ui/skeleton";
export default function ImageLoadingIndicator({
className,
imgLoaded,
}: {
className?: string;
imgLoaded: boolean;
}) {
if (imgLoaded) {
return;
}
return isSafari ? (
<div className={`bg-gray-300 pointer-events-none ${className ?? ""}`} />
) : (
<Skeleton className={`pointer-events-none ${className ?? ""}`} />
);
}