mirror of
https://github.com/vercel/next-learn.git
synced 2026-07-07 22:18:45 +00:00
* Add local date formatting
* Add dashboard hero image
* Update hero styles
* Polish login form
* Use Next.js symbol for logo
* Use Next.js symbol for favicon
* Use img instead of Image
* Add mobile styles to login form
* Polish nav styles to fit logo
* Fix build error
* Create og-image.png
* Remove unused code
* Replace svg logo with png
* Update Images and Links
* Misc
* Remove topnav
* Remove dummy text from cards
* Remove gradient
* Adjust button color
* Fix table horizontal scroll
* Misc
* Fix table UI bug
* Remove duplicate package-lock files
* Polish invoice form
* Rename delete button
* Misc
* Run prettier
* Fix search and pagination on mobile
* Fix pagination border px bug
* Update code to match course
* Rename global -> globals
* 💅 Home Page
* Test placeholder blur
* Use 1.5x image rather than 2x
* Update root layout
* Use <main> for pages
* Make sidebar a server component
* Don't use index for React key
19 lines
473 B
TypeScript
19 lines
473 B
TypeScript
'use client';
|
|
|
|
import { TrashIcon } from '@heroicons/react/24/outline';
|
|
import { useTransition } from 'react';
|
|
import { deleteInvoice } from '@/app/lib/actions';
|
|
|
|
export default function DeleteInvoice({ id }: { id: number }) {
|
|
const [isPending, startTransition] = useTransition();
|
|
|
|
return (
|
|
<button
|
|
onClick={() => startTransition(() => deleteInvoice(id))}
|
|
className="rounded-md border p-1"
|
|
>
|
|
<TrashIcon className="w-4" />
|
|
</button>
|
|
);
|
|
}
|