mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: Text area for devices not found to say no devices (#80011)
* initla commit linting make it along the area * linting
This commit is contained in:
parent
576b8ccff6
commit
89a3337afa
@ -1,6 +1,7 @@
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { Avatar, CellProps, Column, InteractiveTable, Stack, Badge, Tooltip } from '@grafana/ui';
|
||||
import { EmptyArea } from 'app/features/alerting/unified/components/EmptyArea';
|
||||
import { UserAnonymousDeviceDTO } from 'app/types';
|
||||
|
||||
type Cell<T extends keyof UserAnonymousDeviceDTO = keyof UserAnonymousDeviceDTO> = CellProps<
|
||||
@ -86,6 +87,11 @@ export const AnonUsersDevicesTable = ({ devices }: AnonUsersTableProps) => {
|
||||
return (
|
||||
<Stack direction={'column'} gap={2}>
|
||||
<InteractiveTable columns={columns} data={devices} getRowId={(user) => user.deviceId} />
|
||||
{devices.length === 0 && (
|
||||
<EmptyArea>
|
||||
<span>No anonymous users found.</span>
|
||||
</EmptyArea>
|
||||
)}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user