I am currently working with React and TypeScript. Here is my problem: When I try to do a history.push, it returns an error like this: Uncaught (in promise) TypeError: history.push is not a function
Here is my code:
interface Props extends
WithTranslation {
history: any;
}
const Menu: React.FC<Props> = ({
history
}) => {
if (await MarketplaceRequests.sessionsTest()) {
history.push({
pathname: '/',
});
}
return ......
Thank you in advance