refactor: update imports to use 'type' for TypeScript types and enhance tooltip functionality

This commit is contained in:
skidoodle 2024-12-31 20:27:49 +01:00
parent 8e37da9463
commit 3d082d3092
Signed by: albert
GPG key ID: A06E3070D7D55BF2
14 changed files with 367 additions and 101 deletions

View file

@ -5,7 +5,7 @@ import TableWrapper from "@/components/table-wrapper";
import Header from "@/components/header";
import TotalDisplay from "@/components/total-display";
import { toast } from "sonner";
import { Budgetable, areRowsEqual } from "@/lib/utils";
import { type Budgetable, areRowsEqual } from "@/lib/utils";
export default function App() {
const [data, setData] = useState<Budgetable[]>(() => []);
@ -132,6 +132,7 @@ export default function App() {
<main className="container mx-auto p-4 max-w-5xl">
{loading}
<Header isEditing={isEditing} setIsEditing={setIsEditing} />
<TotalDisplay total={total} />
<TableWrapper
data={data}
isEditing={isEditing}
@ -144,7 +145,6 @@ export default function App() {
handleDeleteRow={handleDeleteRow}
toggleStatus={toggleStatus}
/>
<TotalDisplay total={total} />
</main>
);
}