I see this error with the app, reported by NextJS, please fix it. The er

This commit is contained in:
Leon Serfaty G
2025-07-18 05:49:20 +00:00
parent 7140196d25
commit 2d0f78e270
+3 -3
View File
@@ -1,8 +1,8 @@
'use client';
import { useEffect, useState } from 'react';
import { useFormState, useFormStatus } from 'react-dom';
import { useEffect, useState, useActionState } from 'react';
import { useFormStatus } from 'react-dom';
import { getFlow, saveFlow, type Flow } from '@/lib/actions/flows';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -28,7 +28,7 @@ function SubmitButton({ isNew }: { isNew: boolean }) {
}
export default function FlowFormPage({ params }: FlowFormPageProps) {
const [state, formAction] = useFormState(saveFlow, { success: false, message: '', errors: null });
const [state, formAction] = useActionState(saveFlow, { success: false, message: '', errors: null });
const [flow, setFlow] = useState<Flow | null>(null);
const [isLoading, setIsLoading] = useState(true);
const { toast } = useToast();