typescript src/room (#437)
This commit is contained in:
parent
c723fae0e2
commit
2d99acabe2
37 changed files with 465 additions and 284 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue