mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
refactor: route next/navigation through compat re-export (#33636)
This commit is contained in:
@ -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 }),
|
||||
}))
|
||||
|
||||
|
||||
@ -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 }),
|
||||
}))
|
||||
|
||||
|
||||
@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user