Skip to content

[BUG][P0] Type inconsistency in src/app/help/page.tsx breaks build #8

@l0gic

Description

@l0gic

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

  1. Open src/app/help/page.tsx
  2. Run TypeScript type checking
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions