Skip to content

Commit

Permalink
feat(accesslogs) display logout all button TASK-859 (#5429)
Browse files Browse the repository at this point in the history
### 📣 Summary
Makes previously hidden logout-all button accessible

### 👀 Preview steps
1. Log in on two separate browsers
2. Access security settings page in one browser and press logout all
button
3. See that you are logged out from other browser session
  • Loading branch information
jamesrkiger authored Jan 22, 2025
1 parent b4aa1b7 commit 2043fd1
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,37 @@
import React from 'react';

// Partial components
// import Button from 'js/components/common/button';
import Button from 'js/components/common/button';
import PaginatedQueryUniversalTable from 'js/universalTable/paginatedQueryUniversalTable.component';

// Utilities
import useAccessLogsQuery, {type AccessLog} from 'js/query/queries/accessLogs.query';
import {formatTime} from 'js/utils';
// import sessionStore from 'js/stores/session';
import sessionStore from 'js/stores/session';

// Styles
import securityStyles from 'js/account/security/securityRoute.module.scss';

export default function AccessLogsSection() {
// function logOutAllSessions() {
// sessionStore.logOutAll();
// }
function logOutAllSessions() {
sessionStore.logOutAll();
}

return (
<>
<header className={securityStyles.securityHeader}>
<h2 className={securityStyles.securityHeaderText}>
{t('Recent account activity')}
</h2>

{/* TODO: we comment this out until we know how to handle exsiting
sessions for the moment of release of the feature. */}
{/*<div className={securityStyles.securityHeaderActions}>
<div className={securityStyles.securityHeaderActions}>
<Button
type='text'
size='m'
onClick={logOutAllSessions}
label={t('Log out of all devices')}
startIcon='logout'
/>
</div>*/}
</div>
</header>

<PaginatedQueryUniversalTable<AccessLog>
Expand Down

0 comments on commit 2043fd1

Please sign in to comment.