Skip to content

Commit

Permalink
Update deps (#6)
Browse files Browse the repository at this point in the history
* ***Update deps***
```
- new env variables needed to accommodate next-auth and @vercel/postgres requirement to have SSL
```

* - Full deps now

* *** fix type expectations for the useFormState ***
```
- Ensure initialState message is a string => create-form.tsx edit-form.tsx
```

* Prettier:
```
- cards.tsx
- latest-invoices.tsx
- revenue-chart.tsx
```
  • Loading branch information
zenWai authored Jun 22, 2024
1 parent 5359ef6 commit 310ae75
Show file tree
Hide file tree
Showing 7 changed files with 3,839 additions and 2,661 deletions.
3 changes: 1 addition & 2 deletions app/ui/dashboard/cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export function Card({
<h3 className="ml-2 text-sm font-medium">{title}</h3>
</div>
<p
className={`${lusitana.className}
truncate rounded-xl bg-white px-4 py-8 text-center text-2xl`}
className={`${lusitana.className} truncate rounded-xl bg-white px-4 py-8 text-center text-2xl`}
>
{value}
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/ui/dashboard/latest-invoices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default async function LatestInvoices() {
</div>
<div className="flex items-center pb-2 pt-6">
<ArrowPathIcon className="h-5 w-5 text-gray-500" />
<h3 className="ml-2 text-sm text-gray-500 ">Updated just now</h3>
<h3 className="ml-2 text-sm text-gray-500">Updated just now</h3>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/ui/dashboard/revenue-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default async function RevenueChart() {
</div>
<div className="flex items-center pb-2 pt-6">
<CalendarIcon className="h-5 w-5 text-gray-500" />
<h3 className="ml-2 text-sm text-gray-500 ">Last 12 months</h3>
<h3 className="ml-2 text-sm text-gray-500">Last 12 months</h3>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/ui/invoices/create-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { createInvoice } from '@/app/lib/actions';
import { useFormState } from 'react-dom';

export default function Form({ customers }: { customers: CustomerField[] }) {
const initialState = { message: null, errors: {} };
const initialState = { message: '', errors: {} };
const [state, dispatch] = useFormState(createInvoice, initialState);
console.log(state);
return (
Expand Down
2 changes: 1 addition & 1 deletion app/ui/invoices/edit-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function EditInvoiceForm({
invoice: InvoiceForm;
customers: CustomerField[];
}) {
const initialState = { message: null, errors: {} };
const initialState = { message: '', errors: {} };
const updateInvoiceWithId = updateInvoice.bind(null, invoice.id);
const [state, dispatch] = useFormState(updateInvoiceWithId, initialState);
return (
Expand Down
Loading

0 comments on commit 310ae75

Please sign in to comment.