diff --git a/src/components/GenerateCourse/AICourseContent.tsx b/src/components/GenerateCourse/AICourseContent.tsx
index 9e0c4564c..53ddb6e49 100644
--- a/src/components/GenerateCourse/AICourseContent.tsx
+++ b/src/components/GenerateCourse/AICourseContent.tsx
@@ -2,6 +2,7 @@ import {
BookOpenCheck,
ChevronLeft,
CircleAlert,
+ CircleOff,
Loader2,
Menu,
Play,
@@ -140,42 +141,64 @@ export function AICourseContent(props: AICourseContentProps) {
if (error && !isLoading) {
const isLimitReached = error.includes('limit');
+ const isNotFound = error.includes('not exist');
+
+ let icon = ;
+ let title = 'Error occurred';
+ let message = error;
+
+ if (isLimitReached) {
+ icon = ;
+ title = 'Limit Reached';
+ message =
+ 'You have reached the daily AI usage limit. Please upgrade your account to continue.';
+ } else if (isNotFound) {
+ icon = ;
+ title = 'Course Not Found';
+ message =
+ 'The course you are looking for does not exist. Why not create your own course?';
+ }
+
+ const showUpgradeButton = isLimitReached && !isPaidUser;
- const icon = isLimitReached ? (
-
- ) : (
-
- );
- const title = isLimitReached ? 'Limit Reached' : 'Error Generating Course';
- const message = isLimitReached
- ? 'You have reached the daily AI usage limit. Please upgrade your account to continue.'
- : error;
return (
<>
{modals}
{icon}
-
{title}
-
{message}
+
{title}
+
{message}
- {isLimitReached && (
-
- {!isPaidUser && (
-
>
);