forked from git.gladyson/openmonetis
- 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>
38 lines
843 B
TypeScript
38 lines
843 B
TypeScript
"use client";
|
|
|
|
import { CalculatorKeypad } from "@/components/calculadora/calculator-keypad";
|
|
import { useCalculatorKeyboard } from "@/hooks/use-calculator-keyboard";
|
|
import { useCalculatorState } from "@/hooks/use-calculator-state";
|
|
import { CalculatorDisplay } from "./calculator-display";
|
|
|
|
export default function Calculator() {
|
|
const {
|
|
expression,
|
|
history,
|
|
resultText,
|
|
copied,
|
|
buttons,
|
|
copyToClipboard,
|
|
pasteFromClipboard,
|
|
} = useCalculatorState();
|
|
|
|
useCalculatorKeyboard({
|
|
canCopy: Boolean(resultText),
|
|
onCopy: copyToClipboard,
|
|
onPaste: pasteFromClipboard,
|
|
});
|
|
|
|
return (
|
|
<div className="space-y-4">
|
|
<CalculatorDisplay
|
|
history={history}
|
|
expression={expression}
|
|
resultText={resultText}
|
|
copied={copied}
|
|
onCopy={copyToClipboard}
|
|
/>
|
|
<CalculatorKeypad buttons={buttons} />
|
|
</div>
|
|
);
|
|
}
|