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

@ -45,7 +45,7 @@ vi.mock('../../hooks/use-check-metadata-name', () => ({
}),
}))
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({
push: vi.fn(),
}),

View File

@ -22,7 +22,7 @@ type InputCombinedProps = {
type: DataType
}
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({
push: vi.fn(),
}),

View File

@ -2,12 +2,12 @@
import type { FC } from 'react'
import type { MetadataItemWithValue } from '../types'
import { RiDeleteBinLine, RiQuestionLine } from '@remixicon/react'
import { useRouter } from 'next/navigation'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import Divider from '@/app/components/base/divider'
import Tooltip from '@/app/components/base/tooltip'
import useTimestamp from '@/hooks/use-timestamp'
import { useRouter } from '@/next/navigation'
import { cn } from '@/utils/classnames'
import AddMetadataButton from '../add-metadata-button'
import InputCombined from '../edit-metadata-batch/input-combined'