mirror of
https://github.com/Infisical/infisical.git
synced 2026-05-02 03:02:03 -04:00
Fix for "random" crash on creation
This commit is contained in:
@@ -238,6 +238,9 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
||||
projectId: newProjectId
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-promise-executor-return -- We do this because the function returns too fast, which sometimes causes an error when the user is redirected.
|
||||
await new Promise((resolve) => setTimeout(resolve, 2_000));
|
||||
|
||||
createNotification({ text: "Workspace created", type: "success" });
|
||||
handlePopUpClose("addNewWs");
|
||||
|
||||
@@ -520,8 +520,11 @@ const OrganizationPage = withPermission(
|
||||
});
|
||||
}
|
||||
|
||||
createNotification({ text: "Workspace created", type: "success" });
|
||||
// eslint-disable-next-line no-promise-executor-return -- We do this because the function returns too fast, which sometimes causes an error when the user is redirected.
|
||||
await new Promise((resolve) => setTimeout(resolve, 2_000));
|
||||
|
||||
handlePopUpClose("addNewWs");
|
||||
createNotification({ text: "Workspace created", type: "success" });
|
||||
router.push(`/project/${newProjectId}/secrets/overview`);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
Reference in New Issue
Block a user