Skip to content

FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.

error fixes

tilakpatel22931e3a8f3f41
diff --git a/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx b/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx
index 52b6c5e39..23cc09d0c 100644
--- a/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx
+++ b/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx
@@ -770,7 +770,7 @@ export default function FinxeptTerminal() {
}}>
<Tabs value={activeTab} className="h-full">
<TabsContent value="dashboard" className="h-full m-0 p-0">
- <DashboardTab />
+ <DashboardTab onNavigateToTab={setActiveTab} />
</TabsContent>
<TabsContent value="markets" className="h-full m-0 p-0">
<MarketsTab />
diff --git a/fincept-terminal-desktop/src/components/tabs/DashboardTab.tsx b/fincept-terminal-desktop/src/components/tabs/DashboardTab.tsx
index 957df4afe..2eb3810db 100644
--- a/fincept-terminal-desktop/src/components/tabs/DashboardTab.tsx
+++ b/fincept-terminal-desktop/src/components/tabs/DashboardTab.tsx
@@ -108,7 +108,11 @@ const DEFAULT_LAYOUT: WidgetInstance[] = [
const STORAGE_KEY = 'dashboard-widgets';
-const DashboardTab: React.FC = () => {
+interface DashboardTabProps {
+ onNavigateToTab?: (tabName: string) => void;
+}
+
+const DashboardTab: React.FC<DashboardTabProps> = ({ onNavigateToTab }) => {
const [widgets, setWidgets] = useState<WidgetInstance[]>([]);
const [showAddModal, setShowAddModal] = useState(false);
const [currentTime, setCurrentTime] = useState(new Date());
@@ -298,6 +302,7 @@ const DashboardTab: React.FC = () => {
<MaritimeWidget
id={widget.id}
onRemove={() => handleRemoveWidget(widget.id)}
+ onNavigate={() => onNavigateToTab?.('maritime')}
/>
);
default:
diff --git a/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx b/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx
index cd1121f94..dba6c86c7 100644
--- a/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx
+++ b/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx
@@ -1,6 +1,13 @@
import React, { useState, useEffect } from 'react';
import { fetchNewsWithCache, type NewsArticle, getRSSFeedCount, getActiveSources, isUsingMockData } from '../../services/newsService';
+// Extend Window interface for Tauri
+declare global {
+ interface Window {
+ __TAURI__?: any;
+ }
+}
+
const NewsTab: React.FC = () => {
const [currentTime, setCurrentTime] = useState(new Date());
const [activeFilter, setActiveFilter] = useState('ALL');
@@ -35,7 +42,6 @@ const NewsTab: React.FC = () => {
setAlertCount(articles.filter(a => a.priority === 'FLASH' || a.priority === 'URGENT').length);
setActiveSources(getActiveSources());
setNewsUpdateCount(prev => prev + 1);
- setTickerIndex(0); // Reset ticker to first article
} catch (error) {
console.error('Error fetching news:', error);
} finally {
diff --git a/fincept-terminal-desktop/src/services/notebookService.ts b/fincept-terminal-desktop/src/services/notebookService.ts
index d13675c3b..ae55a1806 100644
--- a/fincept-terminal-desktop/src/services/notebookService.ts
+++ b/fincept-terminal-desktop/src/services/notebookService.ts
@@ -69,7 +69,7 @@ class NotebookService {
]
);
- return result.lastInsertId;
+ return result.lastInsertId || 0;
} catch (error) {
console.error('Failed to save notebook to history:', error);
throw error;