async function onSubmit(values: z.infer<typeof formSchema>) { await toast.promise( async () => { await axios.patch(`/api/courses/${courseId}/chapters/${chapterId}`, values); toggleEdit(); router.refresh(); }, { pending: 'Chapter Description is updating', success: 'Chapter Description updated successfully', error: 'SomeThing went wrong', }, ); }