mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-09-24 15:00:31 +08:00
Remove ai course lessons before generation
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user