-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
34 lines (30 loc) · 1007 Bytes
/
Copy pathApp.tsx
File metadata and controls
34 lines (30 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import * as React from 'react';
import { MainView } from './src/views/MainView';
import { dbService } from './services/db';
import { useZenStore } from './store/zenStore';
import { ExtremeErrorBoundary } from './components/ExtremeErrorBoundary';
import { CryptoErrorBoundary } from './components/CryptoErrorBoundary';
import { TestDashboard } from './test/TestDashboard';
export default function App() {
const { setHistory } = useZenStore();
React.useEffect(() => {
// Load initial history with error handling
const loadHistory = async () => {
try {
const entries = await dbService.getAllEntries();
setHistory(entries);
} catch (error) {
console.error('Failed to load history:', error);
}
};
loadHistory();
}, [setHistory]);
return (
<ExtremeErrorBoundary name="App-Level" severity="critical">
<CryptoErrorBoundary>
<MainView />
<TestDashboard />
</CryptoErrorBoundary>
</ExtremeErrorBoundary>
);
}