mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-23 00:02:49 +00:00
1 parent
73d09bc99c
commit
f71817b0a2
1 file changed
+11
-2
+11
-2
@@ -252,10 +252,19 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||
[client]
|
||||
);
|
||||
|
||||
const logout = useCallback(() => {
|
||||
const logout = useCallback(async () => {
|
||||
await client.logout(undefined, true);
|
||||
clearSession();
|
||||
setState({
|
||||
client: undefined,
|
||||
loading: false,
|
||||
isAuthenticated: false,
|
||||
isPasswordlessUser: true,
|
||||
userName: "",
|
||||
error: undefined,
|
||||
});
|
||||
history.push("/");
|
||||
}, [history]);
|
||||
}, [history, client]);
|
||||
|
||||
useEffect(() => {
|
||||
// To protect against multiple sessions writing to the same storage
|
||||
|
||||
Reference in new issue
Block a user