mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
refactor: route next/navigation through compat re-export (#33636)
This commit is contained in:
@ -7,7 +7,7 @@ import InstallForm from './installForm'
|
||||
const mockPush = vi.fn()
|
||||
const mockReplace = vi.fn()
|
||||
|
||||
vi.mock('next/navigation', () => ({
|
||||
vi.mock('@/next/navigation', () => ({
|
||||
useRouter: () => ({ push: mockPush, replace: mockReplace }),
|
||||
}))
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
'use client'
|
||||
import type { InitValidateStatusResponse, SetupStatusResponse } from '@/models/common'
|
||||
import { useStore } from '@tanstack/react-form'
|
||||
import { useRouter } from 'next/navigation'
|
||||
|
||||
import * as React from 'react'
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import * as z from 'zod'
|
||||
@ -13,9 +12,10 @@ import { zodSubmitValidator } from '@/app/components/base/form/utils/zod-submit-
|
||||
import Input from '@/app/components/base/input'
|
||||
import { validPassword } from '@/config'
|
||||
import { LICENSE_LINK } from '@/constants/link'
|
||||
|
||||
import useDocumentTitle from '@/hooks/use-document-title'
|
||||
|
||||
import Link from '@/next/link'
|
||||
import { useRouter } from '@/next/navigation'
|
||||
import { fetchInitValidateStatus, fetchSetupStatus, login, setup } from '@/service/common'
|
||||
import { cn } from '@/utils/classnames'
|
||||
import { encryptPassword as encodePassword } from '@/utils/encryption'
|
||||
|
||||
Reference in New Issue
Block a user