typescript src/room (#437)

This commit is contained in:
Timo 2022-08-02 00:46:16 +02:00 committed by GitHub
commit 2d99acabe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 465 additions and 284 deletions

View file

@ -132,6 +132,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
isAuthenticated: Boolean(client),
isPasswordlessUser,
userName: client?.getUserIdLocalpart(),
error: undefined,
});
})
.catch(() => {
@ -141,6 +142,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
isAuthenticated: false,
isPasswordlessUser: false,
userName: null,
error: undefined,
});
});
}, []);
@ -170,6 +172,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
isAuthenticated: true,
isPasswordlessUser: false,
userName: client.getUserIdLocalpart(),
error: undefined,
});
},
[client]
@ -190,6 +193,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
isAuthenticated: true,
isPasswordlessUser: session.passwordlessUser,
userName: newClient.getUserIdLocalpart(),
error: undefined,
});
} else {
clearSession();
@ -200,6 +204,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
isAuthenticated: false,
isPasswordlessUser: false,
userName: null,
error: undefined,
});
}
},
@ -258,6 +263,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
logout,
userName,
setClient,
error: undefined,
}),
[
loading,