mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 09:58:22 +08:00
fix: strategy studio black screen on create and remove stale benefit3 ref
- Add missing configResponse.ok check in handleCreateStrategy to prevent rendering with invalid config data when API fails - Remove deleted benefit3 translation key reference from LoginRequiredOverlay
This commit is contained in:
@@ -23,7 +23,6 @@ export function LoginRequiredOverlay({ isOpen, onClose, featureName }: LoginRequ
|
||||
const benefits = [
|
||||
tr('benefit1'),
|
||||
tr('benefit2'),
|
||||
tr('benefit3'),
|
||||
tr('benefit4'),
|
||||
]
|
||||
|
||||
|
||||
@@ -201,6 +201,7 @@ export function StrategyStudioPage() {
|
||||
`${API_BASE}/api/strategies/default-config?lang=${language}`,
|
||||
{ headers: { Authorization: `Bearer ${token}` } }
|
||||
)
|
||||
if (!configResponse.ok) throw new Error('Failed to fetch default config')
|
||||
const defaultConfig = await configResponse.json()
|
||||
|
||||
const response = await fetch(`${API_BASE}/api/strategies`, {
|
||||
|
||||
Reference in New Issue
Block a user