5663 i should be able to accept an invite even if i have an inactive workspace (#5839)

- make invitation and reset password available on every page
- add a sleep after setKeyPair as tokens are sometimes not updated when
redirecting to Index
- refactor sleep
This commit is contained in:
martmull
2024-06-13 11:47:00 +02:00
committed by GitHub
parent d93c2d6408
commit b26fd00a40
30 changed files with 95 additions and 75 deletions

View File

@ -0,0 +1,8 @@
export const sleep = async (
ms: number,
callback?: (resolve: (value: any) => void) => void,
) =>
new Promise((resolve) => {
const handler = callback ? () => callback(resolve) : resolve;
setTimeout(handler, ms);
});