From 2d0f78e270820f9f30022720af3c1c0e07655699 Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Fri, 18 Jul 2025 05:49:20 +0000 Subject: [PATCH] I see this error with the app, reported by NextJS, please fix it. The er --- src/app/admin/flows/[id]/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/admin/flows/[id]/page.tsx b/src/app/admin/flows/[id]/page.tsx index 3256623..6aeab51 100644 --- a/src/app/admin/flows/[id]/page.tsx +++ b/src/app/admin/flows/[id]/page.tsx @@ -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(null); const [isLoading, setIsLoading] = useState(true); const { toast } = useToast();