forked from Liquifact/Liquifact-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.js
More file actions
40 lines (35 loc) · 1.31 KB
/
Copy pathpage.js
File metadata and controls
40 lines (35 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"use client";
import { useState } from "react";
import { copy } from "../copy/en";
import NavMenu from "../../components/NavMenu";
import UploadZone from "../../components/UploadZone";
import InvoiceList from "../../components/InvoiceList";
export default function InvoicesPage() {
const [optimisticInvoices, setOptimisticInvoices] = useState([]);
const handleUploadSuccess = (invoice) => {
setOptimisticInvoices((current) => [invoice, ...current]);
};
return (
<div className="min-h-screen bg-slate-950 text-slate-50">
<NavMenu />
<main className="mx-auto max-w-7xl px-4 py-10 sm:px-6 lg:px-8">
<div className="space-y-2 mb-10">
<h1 className="text-3xl font-bold tracking-tight text-slate-100 sm:text-4xl">
{copy.invoices.title || "Invoices"}
</h1>
<p className="text-lg text-slate-400">
{copy.invoices.description || "Upload and tokenize your commercial invoices."}
</p>
</div>
<div className="grid gap-10 lg:grid-cols-3">
<div className="lg:col-span-1">
<UploadZone onUploadSuccess={handleUploadSuccess} />
</div>
<div className="lg:col-span-2">
<InvoiceList optimisticInvoices={optimisticInvoices} />
</div>
</div>
</main>
</div>
);
}