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:
8
packages/twenty-front/src/utils/sleep.ts
Normal file
8
packages/twenty-front/src/utils/sleep.ts
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user