mirror of
https://github.com/chase-manning/pokemon-js.git
synced 2025-11-03 09:28:58 +00:00
🚀 add live badges count to player menu
This commit is contained in:
parent
29924b5d2f
commit
021f8161c8
1 changed files with 3 additions and 1 deletions
|
|
@ -4,11 +4,13 @@ import dateformat from "dateformat";
|
|||
import Menu from "./Menu";
|
||||
import { hidePlayerMenu, selectPlayerMenu } from "../state/uiSlice";
|
||||
import { selectName } from "../state/gameSlice";
|
||||
import useBadges from "../app/use-badges";
|
||||
|
||||
const PlayerMenu = () => {
|
||||
const dispatch = useDispatch();
|
||||
const show = useSelector(selectPlayerMenu);
|
||||
const name = useSelector(selectName);
|
||||
const badges = useBadges();
|
||||
|
||||
return (
|
||||
<Menu
|
||||
|
|
@ -22,7 +24,7 @@ const PlayerMenu = () => {
|
|||
},
|
||||
{
|
||||
label: "Badges",
|
||||
value: 0,
|
||||
value: badges.length,
|
||||
action: () => {},
|
||||
},
|
||||
// {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue