From 6bfa2fd696a306a984b29c6ea11fa66e93e0474c Mon Sep 17 00:00:00 2001
From: aidahosa1 <aisosa_idahosa@brown.edu>
Date: Tue, 4 Jun 2024 12:48:41 -0400
Subject: changes

---
 src/client/views/pdf/GPTPopup/GPTPopup.tsx | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

(limited to 'src/client/views/pdf/GPTPopup/GPTPopup.tsx')

diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
index cb5aad32d..c0f17ba4e 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -317,21 +317,13 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
     sortBox = () => (
         <>
             <div>
-                {this.heading('SORTING')}
-                {this.loading ? (
-                    <div className="content-wrapper">
-                        <div className="loading-spinner">
-                            <ReactLoading type="spin" color={StrCast(Doc.UserDoc().userVariantColor)} height={30} width={30} />
-                            <span>Loading...</span>
-                        </div>
-                    </div>
-                ) : (
+            {this.heading('SORTING')}
                     <>
-                        {!this.cardsDoneLoading ? (
+                        {!this.cardsDoneLoading || this.loading ? (
                             <div className="content-wrapper">
                                 <div className="loading-spinner">
                                     <ReactLoading type="spin" color={StrCast(Doc.UserDoc().userVariantColor)} height={30} width={30} />
-                                    <span>Reading Cards...</span>
+                                    {this.loading ? <span>Loading...</span> : <span>Reading Cards...</span>}
                                 </div>
                             </div>
                         ) : (
@@ -344,10 +336,10 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
                                         color={StrCast(Doc.UserDoc().userVariantColor)}
                                         type={Type.TERT}
                                         style={{
-                                            width: '90%', // Almost as wide as the container
+                                            width: '90%',
                                             textAlign: 'center',
-                                            color: '#ffffff', // White text
-                                            fontSize: '16px', // Adjust font size as needed
+                                            color: '#ffffff', 
+                                            fontSize: '16px', 
                                         }}
                                     />
                                 </div>
@@ -363,7 +355,6 @@ export class GPTPopup extends ObservableReactComponent<GPTPopupProps> {
                             </div>
                         )}
                     </>
-                )}
             </div>
         </>
     );
-- 
cgit v1.2.3-70-g09d2

