diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js index 7c4e6180a..481380835 100644 --- a/web/settings/account-settings.react.js +++ b/web/settings/account-settings.react.js @@ -1,55 +1,63 @@ // @flow import * as React from 'react'; import { logOut } from 'lib/actions/user-actions'; import { preRequestUserStateSelector } from 'lib/selectors/account-selectors'; import { useServerCall } from 'lib/utils/action-utils'; import { useSelector } from '../redux/redux-utils'; import SWMansionIcon from '../SWMansionIcon.react'; import css from './account-settings.css'; function AccountSettings(): React.Node { const sendLogoutRequest = useServerCall(logOut); const preRequestUserState = useSelector(preRequestUserStateSelector); const logOutUser = React.useCallback(() => { sendLogoutRequest(preRequestUserState); }, [sendLogoutRequest, preRequestUserState]); const currentUserInfo = useSelector(state => state.currentUserInfo); if (!currentUserInfo || currentUserInfo.anonymous) { return null; } const { username } = currentUserInfo; return (
); } export default AccountSettings;