79753060

Date: 2025-09-02 04:07:05
Score: 0.5
Natty:
Report link

Add a ternary operator to your sortIcons.sorted prop.
Like this:

sortIcons={{
    sorted: sortStatus.direction === 'asc' ? <>↑</> : <>↓</>,
    unsorted: <>↕</>,
}}

I've added simple Unicode characters in the example, but you can replace them with what ever icons, or ReactNode you like.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: BobSacamano