- Replace ESLint with Biome for linting and formatting - Configure Biome with tabs, double quotes, and organized imports - Move all SQL/Drizzle queries from page.tsx files to data.ts files - Create new data.ts files for: ajustes, dashboard, relatorios/categorias - Update existing data.ts files: extrato, fatura (add lancamentos queries) - Remove all drizzle-orm imports from page.tsx files - Update README.md with new tooling info Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.1 KiB
TypeScript
54 lines
1.1 KiB
TypeScript
import type { ReactNode } from "react";
|
|
import {
|
|
Empty,
|
|
EmptyContent,
|
|
EmptyDescription,
|
|
EmptyHeader,
|
|
EmptyMedia,
|
|
EmptyTitle,
|
|
} from "@/components/ui/empty";
|
|
import { cn } from "@/lib/utils/ui";
|
|
|
|
interface EmptyStateProps {
|
|
title: ReactNode;
|
|
description?: ReactNode;
|
|
action?: ReactNode;
|
|
media?: ReactNode;
|
|
mediaVariant?: "default" | "icon";
|
|
className?: string;
|
|
contentClassName?: string;
|
|
children?: ReactNode;
|
|
}
|
|
|
|
export function EmptyState({
|
|
title,
|
|
description,
|
|
media,
|
|
mediaVariant = "default",
|
|
className,
|
|
contentClassName,
|
|
children,
|
|
}: EmptyStateProps) {
|
|
const hasContent = Boolean(children);
|
|
|
|
return (
|
|
<Empty className={cn("w-full max-w-xl min-h-[320px]", className)}>
|
|
<EmptyHeader>
|
|
{media ? (
|
|
<EmptyMedia variant={mediaVariant} className="mb-0">
|
|
{media}
|
|
</EmptyMedia>
|
|
) : null}
|
|
<EmptyTitle>{title}</EmptyTitle>
|
|
{description ? (
|
|
<EmptyDescription>{description}</EmptyDescription>
|
|
) : null}
|
|
</EmptyHeader>
|
|
|
|
{hasContent ? (
|
|
<EmptyContent className={cn(contentClassName)}>{children}</EmptyContent>
|
|
) : null}
|
|
</Empty>
|
|
);
|
|
}
|