fix: display correct local player count in FavPlayersPage dropdown
Update the label for the LOCAL filter option to reference `localList.length` instead of `list.length`, ensuring the item count displayed in the dropdown matches the actual filtered list size.
File: src/page/FavPlayersPage.tsx
- { label: `${ShowType.LOCAL}(${list.length})`, ... }
+ { label: `${ShowType.LOCAL}(${localList.length})`, ... }
This commit is contained in:
parent
d171e496ff
commit
d0aee38df8
@ -76,7 +76,7 @@ export function FavePlayersPage() {
|
|||||||
value={showType}
|
value={showType}
|
||||||
onChange={e => setShowType(e.target.value)}
|
onChange={e => setShowType(e.target.value)}
|
||||||
options={[
|
options={[
|
||||||
{ label: `${ShowType.LOCAL}(${list.length})`, value: ShowType.LOCAL},
|
{ label: `${ShowType.LOCAL}(${localList.length})`, value: ShowType.LOCAL},
|
||||||
{ label: `${ShowType.ACCOUNT}(${favListRequest.data?.length ?? 0})`, value: ShowType.ACCOUNT}
|
{ label: `${ShowType.ACCOUNT}(${favListRequest.data?.length ?? 0})`, value: ShowType.ACCOUNT}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user