mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 01:46:58 +01:00
Updated event data view.
This commit is contained in:
parent
7723576212
commit
968fda33e3
@ -1,32 +1,15 @@
|
|||||||
import { GridTable, GridColumn, Icon, Text } from 'react-basics';
|
import { GridTable, GridColumn } from 'react-basics';
|
||||||
import { useMessages, useNavigation } from 'components/hooks';
|
import { useMessages } from 'components/hooks';
|
||||||
import Icons from 'components/icons';
|
|
||||||
import PageHeader from 'components/layout/PageHeader';
|
import PageHeader from 'components/layout/PageHeader';
|
||||||
import Empty from 'components/common/Empty';
|
import Empty from 'components/common/Empty';
|
||||||
import { DATA_TYPES } from 'lib/constants';
|
import { DATA_TYPES } from 'lib/constants';
|
||||||
import LinkButton from 'components/common/LinkButton';
|
|
||||||
|
|
||||||
export function EventDataValueTable({ data = [], event }: { data: any[]; event: string }) {
|
export function EventDataValueTable({ data = [], event }: { data: any[]; event: string }) {
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { renderUrl } = useNavigation();
|
|
||||||
|
|
||||||
const Title = () => {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<LinkButton href={renderUrl({ event: undefined })}>
|
|
||||||
<Icon rotate={180}>
|
|
||||||
<Icons.ArrowRight />
|
|
||||||
</Icon>
|
|
||||||
<Text>{formatMessage(labels.back)}</Text>
|
|
||||||
</LinkButton>
|
|
||||||
<Text>{event}</Text>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHeader title={<Title />} />
|
<PageHeader title={event} />
|
||||||
{data.length <= 0 && <Empty />}
|
{data.length <= 0 && <Empty />}
|
||||||
{data.length > 0 && (
|
{data.length > 0 && (
|
||||||
<GridTable data={data}>
|
<GridTable data={data}>
|
||||||
|
Loading…
Reference in New Issue
Block a user