diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js --- a/web/settings/account-settings.react.js +++ b/web/settings/account-settings.react.js @@ -2,7 +2,11 @@ import * as React from 'react'; -import { useLogOut, logOutActionTypes } from 'lib/actions/user-actions.js'; +import { + useLogOut, + logOutActionTypes, + useSecondaryDeviceLogOut, +} from 'lib/actions/user-actions.js'; import { useModalContext } from 'lib/components/modal-provider.react.js'; import SWMansionIcon from 'lib/components/swmansion-icon.react.js'; import { useStringForUser } from 'lib/hooks/ens-cache.js'; @@ -31,11 +35,20 @@ function AccountSettings(): React.Node { const sendLogoutRequest = useLogOut(); + const sendSecondaryDeviceLogoutRequest = useSecondaryDeviceLogOut(); const dispatchActionPromise = useDispatchActionPromise(); const logOutUser = React.useCallback( () => dispatchActionPromise(logOutActionTypes, sendLogoutRequest()), [dispatchActionPromise, sendLogoutRequest], ); + const logOutSecondaryDevice = React.useCallback( + () => + dispatchActionPromise( + logOutActionTypes, + sendSecondaryDeviceLogoutRequest(), + ), + [dispatchActionPromise, sendSecondaryDeviceLogoutRequest], + ); const identityContext = React.useContext(IdentityClientContext); const userID = useSelector(state => state.currentUserInfo?.id); @@ -141,6 +154,18 @@ ); } + let experimentalLogOutSection; + if (staffCanSee) { + experimentalLogOutSection = ( +
Log out
+ {experimentalLogOutSection} {changePasswordSection}