How to fix useContext must be called inside a function component in React | DevErrors