mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Don't prefetch links/pixels. Closes #3814
This commit is contained in:
parent
1390e09400
commit
16cae691f6
5 changed files with 50 additions and 9 deletions
|
|
@ -21,7 +21,11 @@ export function LinksTable(props: DataTableProps) {
|
|||
<DataColumn id="slug" label={formatMessage(labels.link)}>
|
||||
{({ slug }: any) => {
|
||||
const url = getSlugUrl(slug);
|
||||
return <ExternalLink href={url}>{url}</ExternalLink>;
|
||||
return (
|
||||
<ExternalLink href={url} prefetch={false}>
|
||||
{url}
|
||||
</ExternalLink>
|
||||
);
|
||||
}}
|
||||
</DataColumn>
|
||||
<DataColumn id="url" label={formatMessage(labels.destinationUrl)}>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@ export function PixelsTable(props: DataTableProps) {
|
|||
<DataColumn id="url" label="URL">
|
||||
{({ slug }: any) => {
|
||||
const url = getSlugUrl(slug);
|
||||
return <ExternalLink href={url}>{url}</ExternalLink>;
|
||||
return (
|
||||
<ExternalLink href={url} prefetch={false}>
|
||||
{url}
|
||||
</ExternalLink>
|
||||
);
|
||||
}}
|
||||
</DataColumn>
|
||||
<DataColumn id="created" label={formatMessage(labels.created)}>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,13 @@
|
|||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import Link, { type LinkProps } from 'next/link';
|
||||
import type { ReactNode } from 'react';
|
||||
import { ExternalLink as LinkIcon } from '@/components/icons';
|
||||
|
||||
export function ExternalLink({ href, children, ...props }) {
|
||||
export function ExternalLink({
|
||||
href,
|
||||
children,
|
||||
...props
|
||||
}: LinkProps & { href: string; children: ReactNode }) {
|
||||
return (
|
||||
<Row alignItems="center" overflow="hidden" gap>
|
||||
<Text title={href} truncate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue