mirror of
https://github.com/vercel/next-learn.git
synced 2026-07-01 16:44:30 +00:00
Fix
This commit is contained in:
@@ -31,7 +31,7 @@ export type State = {
|
||||
amount?: string[];
|
||||
status?: string[];
|
||||
};
|
||||
message: string;
|
||||
message?: string | undefined;
|
||||
};
|
||||
|
||||
export async function createInvoice(prevState: State, formData: FormData) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
CurrencyDollarIcon,
|
||||
UserCircleIcon,
|
||||
} from '@heroicons/react/24/outline';
|
||||
import { Button } from '../button';
|
||||
import { Button } from '@/app/ui/button';
|
||||
import { createInvoice } from '@/app/lib/actions';
|
||||
import { useFormState } from 'react-dom';
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ import {
|
||||
import Link from 'next/link';
|
||||
import { Button } from '../button';
|
||||
import { updateInvoice } from '@/app/lib/actions';
|
||||
// @ts-ignore React types do not yet include useFormState
|
||||
import { experimental_useFormState as useFormState } from 'react-dom';
|
||||
import { useFormState } from 'react-dom';
|
||||
|
||||
export default function EditInvoiceForm({
|
||||
invoice,
|
||||
|
||||
Reference in New Issue
Block a user