Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

436 B
Raw Blame
import NextLink from 'next/link';
import { type ComponentPropsWithoutRef, forwardRef } from 'react';

export type LinkProps = ComponentPropsWithoutRef<typeof NextLink>;
const cloudMode = !!process.env.cloudMode;

const Link = forwardRef<HTMLAnchorElement, LinkProps>(function Link({ prefetch, ...props }, ref) {
  return <NextLink ref={ref} prefetch={cloudMode ? (prefetch ?? false) : prefetch} {...props} />;
});

export default Link;