added redirects
This commit is contained in:
@@ -9,6 +9,7 @@ import Button from '@material-ui/core/Button';
|
||||
import Logo from "../../img/logo.png";
|
||||
import TextField from '@material-ui/core/TextField';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import { Redirect } from "react-router-dom";
|
||||
|
||||
const url = "/simcompanies/API/user/create"
|
||||
|
||||
@@ -70,6 +71,10 @@ const putCreateAccount = async (url, data) => {
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: JSON.stringify(data)
|
||||
});
|
||||
|
||||
if (response.status == "200") {
|
||||
return <Redirect to={"/login"} />
|
||||
}
|
||||
}
|
||||
|
||||
export default function CreateAccount() {
|
||||
|
||||
Reference in New Issue
Block a user