From cd30c14116bbbab16c21a7ecc31090d2b4bf413f Mon Sep 17 00:00:00 2001
From: Sophie Zhang <sophie_zhang@brown.edu>
Date: Thu, 13 Apr 2023 01:50:41 -0400
Subject: cleaning

---
 src/client/views/pdf/GPTPopup/GPTPopup.tsx | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 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 91bc0a7ff..cc0072a94 100644
--- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx
+++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx
@@ -127,17 +127,19 @@ export class GPTPopup extends React.Component<GPTPopupProps> {
     editBox = () => {
         const hr = this.props.highlightRange;
         return (
-            hr && (
-                <>
-                    <div>
-                        {this.heading('TEXT EDIT SUGGESTIONS')}
-                        <div className="content-wrapper">
+            <>
+                <div>
+                    {this.heading('TEXT EDIT SUGGESTIONS')}
+                    <div className="content-wrapper">
+                        {hr && (
                             <div>
                                 {this.props.text.slice(0, hr[0])} <span className="highlighted-text">{this.props.text.slice(hr[0], hr[1])}</span> {this.props.text.slice(hr[1])}
                             </div>
-                        </div>
+                        )}
                     </div>
-                    {!this.props.loading && (
+                </div>
+                {hr && !this.props.loading && (
+                    <>
                         <div className="btns-wrapper">
                             <>
                                 <button className="icon-btn" onPointerDown={e => this.props.callEditApi(e)}>
@@ -152,10 +154,10 @@ export class GPTPopup extends React.Component<GPTPopupProps> {
                                 </button>
                             </>
                         </div>
-                    )}
-                    {this.aiWarning()}
-                </>
-            )
+                        {this.aiWarning()}
+                    </>
+                )}
+            </>
         );
     };
 
-- 
cgit v1.2.3-70-g09d2

