Component props.
Rendered empty state view with action button.
export default function NoResultsView({
onGoToImport,
}: Readonly<NoResultsViewProps>) {
return (
<motion.div
className="bg-background/50 flex h-full min-h-[60vh] flex-col items-center justify-center rounded-lg border border-dashed border-gray-300 p-12 text-center backdrop-blur-sm dark:border-gray-700"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 0.2, duration: 0.3 }}
>
<motion.div
className="mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-blue-100 dark:bg-blue-900/30"
initial={{ scale: 0, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{
delay: 0.3,
type: "spring",
stiffness: 200,
damping: 20,
}}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-10 w-10 text-blue-600 dark:text-blue-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"
/>
</svg>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.4, duration: 0.3 }}
>
<h3 className="mb-2 text-xl font-semibold">No Manga To Match</h3>
<p className="text-muted-foreground mb-6 text-sm">
No manga data to match. Return to the import page to load your data.
</p>
<Button
className="bg-linear-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700"
onClick={onGoToImport}
>
Go to Import Page
</Button>
</motion.div>
</motion.div>
);
}
Empty state component displayed when no manga data is available to match. Prompts the user to return to the import page to load manga data.