From 401c02cc194371b0ac3eb02fd3d40575a8d72763 Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Tue, 29 Oct 2019 14:38:19 -0400 Subject: [PATCH] KEYCLOAK-11839: Fix linting errors in DeviceActivityPage --- .../DeviceActivityPage.tsx | 31 +++++-------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx index 7e23511d21..e5de3d0e49 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/device-activity-page/DeviceActivityPage.tsx @@ -29,8 +29,6 @@ import { DataListItemCells, Grid, GridItem, - Level, - LevelItem, Stack, StackItem } from '@patternfly/react-core'; @@ -107,7 +105,7 @@ export class DeviceActivityPage extends React.Component { AccountServiceClient.Instance.doDelete("/sessions") - .then( (response: AxiosResponse) => { + .then( () => { KeycloakService.Instance.logout(baseUrl); }); } @@ -122,11 +120,10 @@ export class DeviceActivityPage extends React.Component) => { + .then((response: AxiosResponse) => { console.log({response}); - let devices = response.data as Device[]; - devices = this.moveCurrentToTop(devices); + let devices: Device[] = this.moveCurrentToTop(response.data); this.setState({ devices: devices @@ -188,10 +185,10 @@ export class DeviceActivityPage extends React.Component { + let clientsString = ""; + clients.forEach( (client: Client, index: number) => { let clientName: string; - if (client.hasOwnProperty('clientName') && (client.clientName != undefined) && (client.clientName != '')) { + if (client.hasOwnProperty('clientName') && (client.clientName !== undefined) && (client.clientName !== '')) { clientName = Msg.localize(client.clientName); } else { clientName = client.clientId; @@ -311,18 +308,4 @@ export class DeviceActivityPage extends React.Component ); } -}; - -class IconGridItem extends React.Component { - render() { - return ( - - - - {this.props.children} - - - - ); - } -} \ No newline at end of file +}; \ No newline at end of file