* 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:
Josh Hawkins
2024-06-07 06:57:15 -05:00
committed by GitHub
parent 4313fd97aa
commit 9f181014a1
3 changed files with 14 additions and 5 deletions

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