|
|
|
@ -3,7 +3,6 @@ import { getAiCourseOptions } from '../../queries/ai-course'; |
|
|
|
|
import { queryClient } from '../../stores/query-client'; |
|
|
|
|
import { useEffect, useState } from 'react'; |
|
|
|
|
import { AICourseContent } from './AICourseContent'; |
|
|
|
|
import { generateAiCourseStructure } from '../../lib/ai'; |
|
|
|
|
import { isLoggedIn } from '../../lib/jwt'; |
|
|
|
|
import { generateCourse } from '../../helper/generate-ai-course'; |
|
|
|
|
|
|
|
|
@ -54,6 +53,16 @@ export function GetAICourse(props: GetAICourseProps) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
queryClient.setQueryData( |
|
|
|
|
getAiCourseOptions({ aiCourseSlug: courseSlug }).queryKey, |
|
|
|
|
{ |
|
|
|
|
...aiCourse, |
|
|
|
|
title: '', |
|
|
|
|
difficulty: '', |
|
|
|
|
modules: [], |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
await generateCourse({ |
|
|
|
|
term: aiCourse.keyword, |
|
|
|
|
difficulty: aiCourse.difficulty, |
|
|
|
|