I am creating a login form and when it is submitted, I am redirecting the user to an API website to get a token to access the data.
I am trying to render the following:
if(this.state.isSubmitted) {
return (
<Router>
<Redirect to={`${authEndpoint}?
client_id=${clientId}&redirect_uri=${redirectUri}&scope=${scopes.join(
"%20")}&response_type=token&show_dialog=true`} />
</Router>
);
}
The error I am getting is:
Uncaught Invariant Violation: <Router>: Children of <Router> must have a `path` or `default` prop, or be a `<Redirect>`. None found on element type `function Redirect(_ref)
Can anyone tell me how to fix this please?