FrontendMediumenhancementgood first issue
仓库指标
- 星标
- (1 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
Description
Config types are fetched sequentially in a loop, causing slow page loads.
Files affected
src/hooks/useConfigTypes.ts
Current code
for (const configType of configTypes) {
const response = await fetch(`/api/config/types?type=${configType}`)
}
Recommended fix
Use Promise.allSettled to fetch all configs in parallel.