Fix getGameNameById

Was totally broken, oops.
This commit is contained in:
Tyler Hallada 2022-09-05 18:02:48 -04:00
parent 8adb07e70f
commit 941eb7b08f

View File

@ -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]