fix: division by zero guard, logout redirect, onboarding close button

- auto_trader_risk: skip drawdown check when entryPrice <= 0
- AuthContext: redirect to / on logout
- App.tsx: simplify data page navigation
- BeginnerOnboardingPage: add close button to overlay
This commit is contained in:
shinchan-zhai
2026-03-30 14:02:50 +08:00
parent 55db747318
commit fb0bd13f51
4 changed files with 18 additions and 13 deletions

View File

@@ -451,19 +451,7 @@ function App() {
// Data page - publicly accessible with embedded dashboard
if (route === '/data') {
const dataPageNavigate = (page: Page) => {
const pathMap: Record<string, string> = {
'data': '/data',
'competition': '/competition',
'strategy-market': '/strategy-market',
'traders': '/traders',
'trader': '/dashboard',
'strategy': '/strategy',
'faq': '/faq',
}
const path = pathMap[page]
if (path) {
window.location.href = path
}
navigateToPage(page)
}
return (
<div