From 4ab47ca1755af2604ccffdf01bbbe58c26769224 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Wed, 14 Feb 2024 18:04:09 +0100 Subject: [PATCH] Fix for "random" crash on creation --- frontend/src/layouts/AppLayout/AppLayout.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx index 357e7c770..9dd2d82e7 100644 --- a/frontend/src/layouts/AppLayout/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout/AppLayout.tsx @@ -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)); // 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));