chore: update env vars from backend version

This commit is contained in:
jialin
2026-01-30 20:48:55 +08:00
committed by Lawrence Li
parent 4000aacb2c
commit 4a4a02eb0d
18 changed files with 240 additions and 116 deletions
+19
View File
@@ -0,0 +1,19 @@
import { PageActionType } from '@/config/types';
import { createContext, useContext } from 'react';
interface FormContextProps {
action: PageActionType;
backendSource: string;
}
export const FormContext = createContext<FormContextProps | null>(
{} as FormContextProps
);
export const useFormContext = () => {
const context = useContext(FormContext);
if (!context) {
throw new Error('useFormContext must be used within a FormContextProvider');
}
return context;
};