Fix getGameNameById
Was totally broken, oops.
This commit is contained in:
parent
8adb07e70f
commit
941eb7b08f
@ -31,7 +31,7 @@ const GamesProvider: React.FC = ({ children }) => {
|
|||||||
const getGameNameById = useCallback(
|
const getGameNameById = useCallback(
|
||||||
(id: number): GameName | undefined => {
|
(id: number): GameName | undefined => {
|
||||||
if (data) {
|
if (data) {
|
||||||
return data.find((game) => (game.id = id))?.name;
|
return data.find((game) => game.id === id)?.name;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[data]
|
[data]
|
||||||
|
Loading…
Reference in New Issue
Block a user