refactor: spilt context for better hmr (#33033)

This commit is contained in:
Stephen Zhou
2026-03-05 15:54:56 +08:00
committed by GitHub
parent f3c840a60e
commit f487b680f5
191 changed files with 645 additions and 615 deletions

View File

@ -5,7 +5,7 @@ import { useCheckValidated } from '../use-check-validated'
const mockNotify = vi.fn()
vi.mock('@/app/components/base/toast', () => ({
vi.mock('@/app/components/base/toast/context', () => ({
useToastContext: () => ({
notify: mockNotify,
}),

View File

@ -1,7 +1,7 @@
import type { AnyFormApi } from '@tanstack/react-form'
import type { FormSchema } from '@/app/components/base/form/types'
import { useCallback } from 'react'
import { useToastContext } from '@/app/components/base/toast'
import { useToastContext } from '@/app/components/base/toast/context'
export const useCheckValidated = (form: AnyFormApi, FormSchemas: FormSchema[]) => {
const { notify } = useToastContext()