feat: instrument analysis

This commit is contained in:
OpenSquared
2026-06-30 16:32:08 +02:00
parent 9904c066b2
commit 9ffcfeeb71
3 changed files with 17 additions and 7 deletions

View File

@@ -28,8 +28,10 @@ export function TabsProvider({ children }: { children: ReactNode }) {
const forgetRoute = useCallback((r: string) =>
setKept(p => { const n = new Set(p); n.delete(r); return n }), [])
const openInstrument = useCallback((id: string) =>
setInstrumentIds(p => p.includes(id) ? p : [...p, id]), [])
const openInstrument = useCallback((id: string) => {
localStorage.setItem('last_instrument', id)
setInstrumentIds(p => p.includes(id) ? p : [...p, id])
}, [])
const closeInstrument = useCallback((id: string) =>
setInstrumentIds(p => p.filter(x => x !== id)), [])