feat(www): Finish up on the onboarding (#202)

## Description
This is an attempt to finish up on the onboarding and creating a team

## Type of Change

- [ ] Bug fix (non-breaking change)
- [x] New feature (non-breaking change)
- [ ] Breaking change (fix or feature that changes existing
functionality)
- [ ] Documentation update
- [ ] Other (please describe):

## Checklist

- [ ] I have updated relevant documentation
- [x] My code follows the project's coding style
- [x] My changes generate no new warnings/errors
This commit is contained in:
Wanjohi
2025-03-05 22:44:00 +03:00
committed by GitHub
parent 1aeafec40b
commit 117503081b
19 changed files with 828 additions and 111 deletions

View File

@@ -23,6 +23,8 @@ interface Storage {
current?: string;
}
//TODO: Fix bug where authenticator deletes auth state for no reason
export const client = createClient({
issuer: import.meta.env.VITE_AUTH_URL,
clientID: "web",
@@ -83,6 +85,7 @@ export const { use: useAuth, provider: AuthProvider } =
access: account.access,
})
if (result.err) {
console.log("error", result.err)
if ("id" in account)
setStore(produce((state) => {
delete state.accounts[account.id];
@@ -98,7 +101,7 @@ export const { use: useAuth, provider: AuthProvider } =
authorization: `Bearer ${tokens.access}`,
},
}).then(async (response) => {
await new Promise((resolve) => setTimeout(resolve, 5000));
await new Promise((resolve) => setTimeout(resolve, 10000));
if (response.ok) {
const result = await response.json();
@@ -115,6 +118,7 @@ export const { use: useAuth, provider: AuthProvider } =
}
if (!response.ok)
console.log("error from account", response.json())
setStore(
produce((state) => {
delete state.accounts[account.id];