From 8b69b266d5e0df7fb4ec50b38a3ae1f9bf755a1f Mon Sep 17 00:00:00 2001
From: Kamran Ahmed <kamranahmed.se@gmail.com>
Date: Thu, 17 Apr 2025 11:41:41 +0100
Subject: [PATCH] Fix flicker of paid plan

---
 src/components/GenerateCourse/AICourse.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/GenerateCourse/AICourse.tsx b/src/components/GenerateCourse/AICourse.tsx
index 3c31fabe8..ccbd23a65 100644
--- a/src/components/GenerateCourse/AICourse.tsx
+++ b/src/components/GenerateCourse/AICourse.tsx
@@ -82,8 +82,8 @@ export function AICourse(props: AICourseProps) {
         {isUpgradeModalOpen && (
           <UpgradeAccountModal onClose={() => setIsUpgradeModalOpen(false)} />
         )}
-        {!isPaidUser && isLoggedIn() && (
-          <div className="absolute max-md:hidden bottom-full left-1/2 -translate-x-1/2 -translate-y-8 text-gray-500">
+        {!isPaidUser && !isPaidUserLoading && isLoggedIn() && (
+          <div className="absolute bottom-full left-1/2 -translate-x-1/2 -translate-y-8 text-gray-500 max-md:hidden">
             You are on the free plan
             <button
               onClick={() => setIsUpgradeModalOpen(true)}