feat: instrument analysis
This commit is contained in:
@@ -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 />} />
|
||||
|
||||
Reference in New Issue
Block a user