Update redirect and reload window on setup (#11097)

This commit is contained in:
Luke Heath 2023-04-10 08:44:54 -05:00 committed by GitHub
parent d3781b1945
commit 93cda013c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);