mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 18:45:36 +01:00
Refactored queries.
This commit is contained in:
parent
18e36aa7b3
commit
b16f5cc067
67 changed files with 523 additions and 576 deletions
|
|
@ -6,7 +6,7 @@ import { DATA_TYPES } from 'lib/constants';
|
|||
|
||||
export function EventDataTable({ data = [] }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { makeUrl } = useNavigation();
|
||||
const { renderUrl } = useNavigation();
|
||||
|
||||
if (data.length === 0) {
|
||||
return <Empty />;
|
||||
|
|
@ -16,7 +16,7 @@ export function EventDataTable({ data = [] }) {
|
|||
<GridTable data={data}>
|
||||
<GridColumn name="eventName" label={formatMessage(labels.event)}>
|
||||
{row => (
|
||||
<Link href={makeUrl({ event: row.eventName })} shallow={true}>
|
||||
<Link href={renderUrl({ event: row.eventName })} shallow={true}>
|
||||
{row.eventName}
|
||||
</Link>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ import { DATA_TYPES } from 'lib/constants';
|
|||
|
||||
export function EventDataValueTable({ data = [], event }: { data: any[]; event: string }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { makeUrl } = useNavigation();
|
||||
const { renderUrl } = useNavigation();
|
||||
|
||||
const Title = () => {
|
||||
return (
|
||||
<>
|
||||
<Link href={makeUrl({ event: undefined })}>
|
||||
<Link href={renderUrl({ event: undefined })}>
|
||||
<Button>
|
||||
<Icon rotate={180}>
|
||||
<Icons.ArrowRight />
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import WebsiteHeader from '../WebsiteHeader';
|
||||
import WebsiteEventData from './WebsiteEventData';
|
||||
|
||||
export default function WebsiteEventDataPage({ params: { id } }) {
|
||||
if (!id) {
|
||||
export default function WebsiteEventDataPage({ params: { websiteId } }) {
|
||||
if (!websiteId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<WebsiteHeader websiteId={id} />
|
||||
<WebsiteEventData websiteId={id} />
|
||||
<WebsiteHeader websiteId={websiteId} />
|
||||
<WebsiteEventData websiteId={websiteId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue