refactor: route next/navigation through compat re-export (#33636)

This commit is contained in:
yyh
2026-03-18 12:57:03 +08:00
committed by GitHub
parent 04c0bf61fa
commit 296b7044af
269 changed files with 320 additions and 328 deletions

View File

@ -1,11 +1,11 @@
import type { Mock } from 'vitest'
import { render, screen } from '@testing-library/react'
import { useSelectedLayoutSegment } from 'next/navigation'
import { usePluginTaskStatus } from '@/app/components/plugins/plugin-page/plugin-tasks/hooks'
import { useSelectedLayoutSegment } from '@/next/navigation'
import PluginsNav from '../index'
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useSelectedLayoutSegment: vi.fn(),
}))

View File

@ -1,11 +1,11 @@
'use client'
import { useSelectedLayoutSegment } from 'next/navigation'
import { useTranslation } from 'react-i18next'
import { Group } from '@/app/components/base/icons/src/vender/other'
import Indicator from '@/app/components/header/indicator'
import { usePluginTaskStatus } from '@/app/components/plugins/plugin-page/plugin-tasks/hooks'
import Link from '@/next/link'
import { useSelectedLayoutSegment } from '@/next/navigation'
import { cn } from '@/utils/classnames'
import DownloadingIcon from './downloading-icon'