From bf82c6fd16a6777f0a9bb68ce4879d7bab9019bb Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Tue, 26 Sep 2023 11:14:46 -0700
Subject: fix: :bug: now progress bar when api_key entered

---
 extension/react-app/src/components/Layout.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'extension/react-app/src/components/Layout.tsx')

diff --git a/extension/react-app/src/components/Layout.tsx b/extension/react-app/src/components/Layout.tsx
index 6dbd348f..93729783 100644
--- a/extension/react-app/src/components/Layout.tsx
+++ b/extension/react-app/src/components/Layout.tsx
@@ -85,8 +85,7 @@ const Layout = () => {
   );
 
   const defaultModel = useSelector(
-    (state: RootStore) =>
-      (state.serverState.config as any).models?.default?.class_name
+    (state: RootStore) => (state.serverState.config as any).models?.default
   );
   // #region Selectors
 
@@ -185,7 +184,8 @@ const Layout = () => {
                 />
               )}
               <ModelSelect />
-              {defaultModel === "OpenAIFreeTrial" &&
+              {defaultModel.class_name === "OpenAIFreeTrial" &&
+                defaultModel.api_key === "" &&
                 (location.pathname === "/settings" ||
                   parseInt(localStorage.getItem("ftc") || "0") >= 125) && (
                   <ProgressBar
-- 
cgit v1.2.3-70-g09d2

