mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Update redirect and reload window on setup (#11097)
This commit is contained in:
parent
d3781b1945
commit
93cda013c3
@ -52,7 +52,7 @@ const RegistrationPage = ({ router }: IRegistrationPageProps) => {
|
||||
};
|
||||
|
||||
const onRegistrationFormSubmit = async (formData: any) => {
|
||||
const { MANAGE_HOSTS } = paths;
|
||||
const { DASHBOARD } = paths;
|
||||
|
||||
try {
|
||||
const { token } = await usersAPI.setup(formData);
|
||||
@ -61,7 +61,8 @@ const RegistrationPage = ({ router }: IRegistrationPageProps) => {
|
||||
const { user, available_teams } = await usersAPI.me();
|
||||
setCurrentUser(user);
|
||||
setAvailableTeams(user, available_teams);
|
||||
return router.push(MANAGE_HOSTS);
|
||||
router.push(DASHBOARD);
|
||||
window.location.reload();
|
||||
} catch (error) {
|
||||
setPage(1);
|
||||
setPageProgress(1);
|
||||
|
Loading…
Reference in New Issue
Block a user