mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): prefetch all links
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import type { NavLink } from './NavBar.astro';
|
||||
import { Dialog } from '@base-ui-components/react/dialog';
|
||||
import clsx from 'clsx';
|
||||
import { ArrowUpRight, Menu, X } from 'lucide-react';
|
||||
import { DISCORD_INVITE_URL, GITHUB_REPO_URL } from '@/consts';
|
||||
|
||||
interface NavLink {
|
||||
href: string;
|
||||
label: string;
|
||||
matchPath: string | null;
|
||||
external?: boolean;
|
||||
}
|
||||
|
||||
export interface MobileNavProps {
|
||||
navLinks: NavLink[];
|
||||
currentPath: string;
|
||||
@@ -52,7 +58,6 @@ export default function MobileNav({ navLinks, currentPath, dark = false, childre
|
||||
href={link.href}
|
||||
className={clsx('text-lg px-6 py-3', link.matchPath && currentPath.startsWith(link.matchPath) ? 'underline' : 'intent:underline')}
|
||||
aria-current={link.matchPath && currentPath.startsWith(link.matchPath) ? 'page' : undefined}
|
||||
data-astro-prefetch={link.prefetch ? '' : undefined}
|
||||
>
|
||||
{link.label}
|
||||
{' '}
|
||||
|
||||
Reference in New Issue
Block a user