fix: fix tasks

This commit is contained in:
2025-06-14 22:30:58 +08:00
parent 882b29d7a1
commit 1b5bdadf10
15 changed files with 91 additions and 49 deletions

View File

@@ -1,18 +1,30 @@
import { memo } from "react";
import { cn } from "@/presentation/utils";
import { DetailedHTMLProps, HTMLAttributes, memo } from "react";
import { Card, CardContent } from "./card";
export interface DetailEmptyViewProps {
export interface DetailEmptyViewProps
extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
message: string;
fullWidth?: boolean;
}
export const DetailEmptyView = memo(({ message }: DetailEmptyViewProps) => {
return (
<div className="container mx-auto py-6 max-w-4xl">
<Card>
<CardContent className="flex items-center justify-center h-32">
<p className="text-muted-foreground">{message ?? "No data"}</p>
</CardContent>
</Card>
</div>
);
});
export const DetailEmptyView = memo(
({ message, fullWidth, ...props }: DetailEmptyViewProps) => {
return (
<div
{...props}
className={cn(
"container mx-auto py-6",
fullWidth ? "w-full" : "max-w-4xl",
props.className
)}
>
<Card>
<CardContent className="flex items-center justify-center h-32">
<p className="text-muted-foreground">{message ?? "No data"}</p>
</CardContent>
</Card>
</div>
);
}
);