Clean up cache and redux store after logout
Summary: There were redundant places we were cleaning up and logging out, now all syncronisation between the atom world and everything else is done via the atom subscription. Reviewed By: aigoncharov Differential Revision: D44463888 fbshipit-source-id: 9fc2af64b1e0667dd852096557107a48f2fa924c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
91c5a11e1b
commit
90069381e8
@@ -50,7 +50,6 @@ import WelcomeScreen from './WelcomeScreen';
|
||||
import {errorCounterAtom} from '../chrome/ConsoleLogs';
|
||||
import {ToplevelProps} from './SandyApp';
|
||||
import {useValue} from 'flipper-plugin';
|
||||
import {logout} from '../reducers/user';
|
||||
import config from '../fb-stubs/config';
|
||||
import styled from '@emotion/styled';
|
||||
import {showEmulatorLauncher} from './appinspect/LaunchEmulator';
|
||||
@@ -79,7 +78,7 @@ import {css} from '@emotion/css';
|
||||
import {getRenderHostInstance} from 'flipper-frontend-core';
|
||||
import {StyleGuide} from './StyleGuide';
|
||||
import {useEffect} from 'react';
|
||||
import {isConnected, isLoggedIn} from '../fb-stubs/user';
|
||||
import {isConnected, isLoggedIn, logoutUser} from '../fb-stubs/user';
|
||||
|
||||
const LeftRailButtonElem = styled(Button)<{kind?: 'small'}>(({kind}) => ({
|
||||
width: kind === 'small' ? 32 : 36,
|
||||
@@ -620,9 +619,9 @@ function LoginConnectivityButton() {
|
||||
<Button
|
||||
block
|
||||
style={{backgroundColor: theme.backgroundDefault}}
|
||||
onClick={() => {
|
||||
onClick={async () => {
|
||||
onHandleVisibleChange(false);
|
||||
dispatch(logout());
|
||||
await logoutUser();
|
||||
}}>
|
||||
Log Out
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user