Refactor AI course generation

feat/ai-courses
Kamran Ahmed 1 month ago
parent 7c60b79942
commit 78833b5d8c
  1. 5
      src/components/GenerateCourse/GenerateAICourse.tsx

@ -1,7 +1,6 @@
import { useEffect, useState } from 'react';
import { getUrlParams } from '../../lib/browser';
import { isLoggedIn } from '../../lib/jwt';
import { showLoginPopup } from '../../lib/popup';
import { generateAiCourseStructure, type AiCourse } from '../../lib/ai';
import { readAICourseStream } from '../../helper/read-stream';
import { AICourseContent } from './AICourseContent';
@ -49,9 +48,7 @@ export function GenerateAICourse(props: GenerateAICourseProps) {
const { term, difficulty } = options;
if (!isLoggedIn()) {
setIsLoading(false);
setError('You must be logged in to generate a course');
showLoginPopup();
window.location.href = '/ai-tutor';
return;
}

Loading…
Cancel
Save