Show message for no motion data

This commit is contained in:
Josh Hawkins 2024-06-06 23:17:15 -05:00
parent eb1fa19dbd
commit a56a69a0aa

View File

@ -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 />;
}