From 35497f0ba119f3cdfb2eb5049f97677f287f877a Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Fri, 28 Feb 2025 19:24:21 +0600 Subject: [PATCH] wip --- src/components/GenerateCourse/AICourseContent.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/GenerateCourse/AICourseContent.tsx b/src/components/GenerateCourse/AICourseContent.tsx index 9b9ab8fef..28c304fd6 100644 --- a/src/components/GenerateCourse/AICourseContent.tsx +++ b/src/components/GenerateCourse/AICourseContent.tsx @@ -12,6 +12,7 @@ import { readAICourseStream } from '../../helper/read-stream'; import { cn } from '../../lib/classname'; import { getUrlParams } from '../../lib/browser'; import { AICourseModuleView } from './AICourseModuleView'; +import { showLoginPopup } from '../../lib/popup'; import { isLoggedIn } from '../../lib/jwt'; type Lesson = string; @@ -126,7 +127,10 @@ export function AICourseContent(props: AICourseContentProps) { difficulty?: string; slug?: string; }) => { - if (!isLoggedIn()) { + // it means that they are not logged in and they are not generating a course from a slug + // so we need to show the login popup - basically they are trying to generate a course from the search page + if (!isLoggedIn() && !defaultSlug) { + showLoginPopup(); return; }