From 8a6efe279a16774d9fe68e0f3a27d605ea1c86d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivica=20=C4=8Cardi=C4=87?= Date: Mon, 7 Oct 2024 12:40:06 +0200 Subject: [PATCH] 1570 - SF --- client/src/App.tsx | 30 ++++++++----------- .../pages/platform/copilot/CopilotPanel.tsx | 16 +++------- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index 539f478689..889780a9c8 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -31,11 +31,13 @@ const user = { name: 'Emily Selman', }; -const automationNavigation: { +type NavigationType = { name: string; href: string; icon: LucideIcon; -}[] = [ +}; + +const automationNavigation: NavigationType[] = [ { href: '/automation/projects', icon: FolderIcon, @@ -59,11 +61,7 @@ const automationNavigation: { }, ]; -const embeddedNavigation: { - name: string; - href: string; - icon: LucideIcon; -}[] = [ +const embeddedNavigation: NavigationType[] = [ { href: '/embedded/integrations', icon: SquareIcon, @@ -115,11 +113,13 @@ function App() { return true; }); - const navigation = location.pathname.includes('automation') - ? filteredAutomationNavigation - : location.pathname.includes('embedded') - ? embeddedNavigation - : []; + let navigation: NavigationType[] = []; + + if (location.pathname.includes('automation')) { + navigation = filteredAutomationNavigation; + } else if (location.pathname.includes('embedded')) { + navigation = embeddedNavigation; + } useFetchInterceptor(); @@ -154,11 +154,7 @@ function App() { } }, [authenticated, sessionHasBeenFetched, navigate]); - if (!authenticated) { - return <>; - } - - if (loadingFeatureFlags) { + if (!authenticated || loadingFeatureFlags) { return <>; } diff --git a/client/src/pages/platform/copilot/CopilotPanel.tsx b/client/src/pages/platform/copilot/CopilotPanel.tsx index acd4e64047..6f5cae9568 100644 --- a/client/src/pages/platform/copilot/CopilotPanel.tsx +++ b/client/src/pages/platform/copilot/CopilotPanel.tsx @@ -24,7 +24,7 @@ const CopilotPanel = () => {
- U + U

User

@@ -41,7 +41,7 @@ const CopilotPanel = () => {
- A + A

Assistant

@@ -121,7 +121,7 @@ const CopilotPanel = () => {
- U + U

User

@@ -138,7 +138,7 @@ const CopilotPanel = () => {
- A + A

Assistant

@@ -152,8 +152,6 @@ const CopilotPanel = () => {
-
- Supervised learning is a method where the algorithm learns from labeled training data. In other words, the input data comes with the correct answers (labels), and @@ -162,14 +160,10 @@ const CopilotPanel = () => {
-
- Key points about supervised learning:
-
- 1. Training Data: It consists of input features and their corresponding correct output labels. @@ -221,8 +215,6 @@ const CopilotPanel = () => {
-
- Is there anything specific about supervised learning you'd like me to elaborate on?