refactor: route next/link through compat re-export (#33632)

This commit is contained in:
yyh
2026-03-18 12:14:59 +08:00
committed by GitHub
parent 6100acb780
commit 69d1ccb7a7
86 changed files with 94 additions and 89 deletions

View File

@ -16,7 +16,7 @@ vi.mock('next-themes', () => ({
useTheme: vi.fn(),
}))
vi.mock('next/link', () => ({
vi.mock('@/next/link', () => ({
default: ({ children, href }: { children: React.ReactNode, href: string }) => (
<a href={href} data-testid="mock-link">{children}</a>
),

View File

@ -4,7 +4,6 @@ import {
RiArrowRightUpLine,
} from '@remixicon/react'
import { useTheme } from 'next-themes'
import Link from 'next/link'
import {
memo,
useCallback,
@ -15,6 +14,7 @@ import Divider from '@/app/components/base/divider'
import Loading from '@/app/components/base/loading'
import List from '@/app/components/plugins/marketplace/list'
import ProviderCard from '@/app/components/plugins/provider-card'
import Link from '@/next/link'
import { cn } from '@/utils/classnames'
import { getMarketplaceUrl } from '@/utils/var'
import {