fo,dm 버전업 후 수정
This commit is contained in:
@@ -34,7 +34,7 @@ export interface SdmInfoRegFormProps {
|
||||
|
||||
type FieldComponent = (
|
||||
field: ControllerRenderProps<SdmInfoFormData, keyof SdmInfoFormData>
|
||||
) => React.ReactElement;
|
||||
) => React.ReactElement<{ disabled?: boolean }>;
|
||||
|
||||
export function SdmInfoRegForm({
|
||||
form,
|
||||
|
||||
@@ -7,9 +7,7 @@ import { type FoStore, StoreZus } from './store'
|
||||
|
||||
export type StoreApi = ReturnType<typeof StoreZus>
|
||||
|
||||
export const StoreContext = createContext<StoreApi | undefined>(
|
||||
undefined,
|
||||
)
|
||||
export const StoreContext = createContext<StoreApi | null>(null);
|
||||
|
||||
export interface StoreProviderProps {
|
||||
children: ReactNode
|
||||
@@ -18,7 +16,7 @@ export interface StoreProviderProps {
|
||||
export const StoreProvider = ({
|
||||
children,
|
||||
}: StoreProviderProps) => {
|
||||
const storeRef = useRef<StoreApi>()
|
||||
const storeRef = useRef<StoreApi | null>(null);
|
||||
|
||||
if (!storeRef.current) {
|
||||
const store = StoreZus()
|
||||
|
||||
Reference in New Issue
Block a user