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:
tinkle-community
2026-03-16 07:55:47 +08:00
parent 21a15f98eb
commit 7203655ae7
2 changed files with 1 additions and 1 deletions
@@ -23,7 +23,6 @@ export function LoginRequiredOverlay({ isOpen, onClose, featureName }: LoginRequ
const benefits = [
tr('benefit1'),
tr('benefit2'),
tr('benefit3'),
tr('benefit4'),
]
+1
View File
@@ -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`, {