feat: instrument analysis

This commit is contained in:
OpenSquared
2026-06-30 16:50:26 +02:00
parent 9ffcfeeb71
commit ecb9b74b20
3 changed files with 30 additions and 8 deletions

View File

@@ -100,7 +100,7 @@ function KeepAlivePage({ path, component: Component }: { path: string; component
// Registers the instrument tab on navigation (renders nothing itself)
function InstrumentRoute() {
const { id = localStorage.getItem('last_instrument') || 'EURUSD' } = useParams<{ id: string }>()
const { id = localStorage.getItem('last_instrument') || 'EURUSD=X' } = useParams<{ id: string }>()
const { openInstrument } = useTabs()
useEffect(() => { openInstrument(id.toUpperCase()) }, [id, openInstrument])
return null
@@ -129,7 +129,7 @@ function NormalRoutes() {
return (
<div className={isInstrument ? 'hidden' : 'flex-1 overflow-auto'}>
<Routes>
<Route path="/instruments" element={<Navigate to={`/instruments/${localStorage.getItem('last_instrument') || 'EURUSD'}`} replace />} />
<Route path="/instruments" element={<Navigate to={`/instruments/${localStorage.getItem('last_instrument') || 'EURUSD=X'}`} replace />} />
<Route path="/instruments/:id" element={<InstrumentRoute />} />
{/* Legacy redirects */}
<Route path="/impact" element={<Navigate to="/market-events" replace />} />