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

@ -12,7 +12,7 @@ const mocks = vi.hoisted(() => ({
mutateExternalKnowledgeApis: vi.fn(),
}))
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({ push: mocks.push, refresh: mocks.refresh }),
}))

View File

@ -10,7 +10,7 @@ const mocks = vi.hoisted(() => ({
externalKnowledgeApiList: [] as Array<{ id: string, name: string, settings: { endpoint: string } }>,
}))
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({ push: mocks.push, refresh: mocks.refresh }),
}))

View File

@ -7,7 +7,7 @@ import RetrievalSettings from '../RetrievalSettings'
const mockReplace = vi.fn()
const mockRefresh = vi.fn()
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({
replace: mockReplace,
push: vi.fn(),