Fix for "random" crash on creation

This commit is contained in:
Daniel Hougaard
2024-02-22 05:00:40 +01:00
parent 021413fbd9
commit 4ab47ca175
@@ -242,6 +242,9 @@ export const AppLayout = ({ children }: LayoutProps) => {
// 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. // 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)); await new Promise((resolve) => setTimeout(resolve, 2_000));
// 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" }); createNotification({ text: "Workspace created", type: "success" });
handlePopUpClose("addNewWs"); handlePopUpClose("addNewWs");
router.push(`/project/${newProjectId}/secrets/overview`); router.push(`/project/${newProjectId}/secrets/overview`);