mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 09:04:28 +03:00
* use prettier-plugin-tailwindcss to keep class names organized * use prettierrc file to ensure formatting on save works with vscode * classname reorder with prettier-plugin-tailwindcss
22 lines
466 B
TypeScript
22 lines
466 B
TypeScript
import { isSafari } from "react-device-detect";
|
|
import { Skeleton } from "../ui/skeleton";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export default function ImageLoadingIndicator({
|
|
className,
|
|
imgLoaded,
|
|
}: {
|
|
className?: string;
|
|
imgLoaded: boolean;
|
|
}) {
|
|
if (imgLoaded) {
|
|
return;
|
|
}
|
|
|
|
return isSafari ? (
|
|
<div className={cn("pointer-events-none bg-gray-300", className)} />
|
|
) : (
|
|
<Skeleton className={cn("pointer-events-none", className)} />
|
|
);
|
|
}
|