I see this error with the app, reported by NextJS, please fix it. The er
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState, useActionState } from 'react';
|
||||||
import { useFormState, useFormStatus } from 'react-dom';
|
import { useFormStatus } from 'react-dom';
|
||||||
import { getFlow, saveFlow, type Flow } from '@/lib/actions/flows';
|
import { getFlow, saveFlow, type Flow } from '@/lib/actions/flows';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
@@ -28,7 +28,7 @@ function SubmitButton({ isNew }: { isNew: boolean }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function FlowFormPage({ params }: FlowFormPageProps) {
|
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 [flow, setFlow] = useState<Flow | null>(null);
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
|
|||||||
Reference in New Issue
Block a user