From 64b1d9266e3d45608a50ea94fb59074bde9d99dd Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Tue, 13 Feb 2024 16:26:56 +0000 Subject: [PATCH] Updated the Speaking Generation to save the topic as well --- src/pages/(generation)/SpeakingGeneration.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/(generation)/SpeakingGeneration.tsx b/src/pages/(generation)/SpeakingGeneration.tsx index 33c2431a..1ba762a2 100644 --- a/src/pages/(generation)/SpeakingGeneration.tsx +++ b/src/pages/(generation)/SpeakingGeneration.tsx @@ -70,7 +70,7 @@ const PartTab = ({ playSound(isError ? "error" : "check"); if (isError) return toast.error("Something went wrong, please try to generate the video again."); - setPart({...part, result: result.data, gender, avatar}); + setPart({...part, result: {...result.data, topic: part?.topic}, gender, avatar}); }) .catch((e) => { toast.error("Something went wrong!"); @@ -79,6 +79,8 @@ const PartTab = ({ .finally(() => setIsLoading(false)); }; + useEffect(() => console.log(part), [part]); + return (