-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
Describe the bug
The filteredContent useMemo in src/app/help/page.tsx returns different types depending on conditions:
- Returns
string[](topic keys) when there's no search query - Returns
{ key, content, category }[]objects when searching
This causes TypeScript errors when accessing properties like key, content, and category.
To Reproduce
- Open
src/app/help/page.tsx - Run TypeScript type checking
- Observe errors on line 295-327
Expected behavior
The filteredContent should always return a consistent type, or the code should handle the union type properly with type guards.
Possible Solution
Return a consistent object array structure for both cases, or use proper type guards before accessing properties.
Files Affected
src/app/help/page.tsx:295-327
Discovered By
Automated build error analysis during dev server startup.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels