mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
OrgUsers: Refactor change LastSeenAtAge
from '10 years' to 'Never' (#84247)
* refactor: change lastseenatage to Never * removed unncessecary fragments
This commit is contained in:
parent
c45f96e9de
commit
fbfaf8e003
@ -15,6 +15,7 @@ import {
|
||||
Pagination,
|
||||
Stack,
|
||||
Tag,
|
||||
Text,
|
||||
Tooltip,
|
||||
} from '@grafana/ui';
|
||||
import { UserRolePicker } from 'app/core/components/RolePicker/UserRolePicker';
|
||||
@ -107,7 +108,9 @@ export const OrgUsersTable = ({
|
||||
{
|
||||
id: 'lastSeenAtAge',
|
||||
header: 'Last active',
|
||||
cell: ({ cell: { value } }: Cell<'lastSeenAtAge'>) => value,
|
||||
cell: ({ cell: { value } }: Cell<'lastSeenAtAge'>) => {
|
||||
return <>{value && value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>;
|
||||
},
|
||||
sortType: (a, b) => new Date(a.original.lastSeenAt).getTime() - new Date(b.original.lastSeenAt).getTime(),
|
||||
},
|
||||
{
|
||||
|
@ -117,7 +117,7 @@ export const UsersTable = ({
|
||||
iconName: 'question-circle',
|
||||
},
|
||||
cell: ({ cell: { value } }: Cell<'lastSeenAtAge'>) => {
|
||||
return <>{value && <>{value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>}</>;
|
||||
return <>{value && value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>;
|
||||
},
|
||||
sortType: (a, b) => new Date(a.original.lastSeenAt!).getTime() - new Date(b.original.lastSeenAt!).getTime(),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user