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

@ -7,7 +7,7 @@ import ExternalKnowledgeBaseConnector from '../index'
const mockRouterBack = vi.fn()
const mockReplace = vi.fn()
vi.mock('next/navigation', () => ({
vi.mock('@/next/navigation', () => ({
useRouter: () => ({
back: mockRouterBack,
replace: mockReplace,

View File

@ -1,12 +1,12 @@
'use client'
import type { CreateKnowledgeBaseReq } from '@/app/components/datasets/external-knowledge-base/create/declarations'
import { useRouter } from 'next/navigation'
import * as React from 'react'
import { useState } from 'react'
import { trackEvent } from '@/app/components/base/amplitude'
import { useToastContext } from '@/app/components/base/toast/context'
import ExternalKnowledgeBaseCreate from '@/app/components/datasets/external-knowledge-base/create'
import { useRouter } from '@/next/navigation'
import { createExternalKnowledgeBase } from '@/service/datasets'
const ExternalKnowledgeBaseConnector = () => {