mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-03-10 04:51:47 +00:00
refactor: migrate from ESLint to Biome and extract SQL queries to data.ts
- 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>
This commit is contained in:
@@ -6,48 +6,48 @@ import { useEffect } from "react";
|
||||
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Empty,
|
||||
EmptyContent,
|
||||
EmptyDescription,
|
||||
EmptyHeader,
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
Empty,
|
||||
EmptyContent,
|
||||
EmptyDescription,
|
||||
EmptyHeader,
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
} from "@/components/ui/empty";
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
reset,
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
}) {
|
||||
useEffect(() => {
|
||||
// Log the error to an error reporting service
|
||||
console.error(error);
|
||||
}, [error]);
|
||||
useEffect(() => {
|
||||
// Log the error to an error reporting service
|
||||
console.error(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center p-4">
|
||||
<Empty className="max-w-md border-0">
|
||||
<EmptyHeader>
|
||||
<EmptyMedia variant="icon" className="bg-destructive/10 size-16">
|
||||
<RiErrorWarningFill className="size-8 text-destructive" />
|
||||
</EmptyMedia>
|
||||
<EmptyTitle className="text-2xl">Algo deu errado</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Ocorreu um problema inesperado. Por favor, tente novamente ou volte
|
||||
para o dashboard.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
<EmptyContent>
|
||||
<div className="flex flex-col gap-2 sm:flex-row">
|
||||
<Button onClick={() => reset()}>Tentar Novamente</Button>
|
||||
<Button variant="outline" asChild>
|
||||
<Link href="/dashboard">Voltar para o Dashboard</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</EmptyContent>
|
||||
</Empty>
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center p-4">
|
||||
<Empty className="max-w-md border-0">
|
||||
<EmptyHeader>
|
||||
<EmptyMedia variant="icon" className="bg-destructive/10 size-16">
|
||||
<RiErrorWarningFill className="size-8 text-destructive" />
|
||||
</EmptyMedia>
|
||||
<EmptyTitle className="text-2xl">Algo deu errado</EmptyTitle>
|
||||
<EmptyDescription>
|
||||
Ocorreu um problema inesperado. Por favor, tente novamente ou volte
|
||||
para o dashboard.
|
||||
</EmptyDescription>
|
||||
</EmptyHeader>
|
||||
<EmptyContent>
|
||||
<div className="flex flex-col gap-2 sm:flex-row">
|
||||
<Button onClick={() => reset()}>Tentar Novamente</Button>
|
||||
<Button variant="outline" asChild>
|
||||
<Link href="/dashboard">Voltar para o Dashboard</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</EmptyContent>
|
||||
</Empty>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user