Improve typings

Signed-off-by: Jasper Boeijenga <jboeijenga@gmail.com>
This commit is contained in:
Jasper Boeijenga
2024-09-02 10:22:44 +02:00
parent 0dfe21016f
commit 8be7cbf8a9
3 changed files with 5 additions and 3 deletions
@@ -116,7 +116,9 @@ export const Stepper = (stepperProps: StepperProps) => {
const [activeStep, setActiveStep] = useState(0);
const [isValidating, setIsValidating] = useState(false);
const initialState = useFormDataFromQuery(props.initialState);
const [formState, setFormState] = useState<{ [step: string]: any }>();
const [formState, setFormState] = useState<{
[step: string]: Record<string, JsonValue>;
}>();
const [errors, setErrors] = useState<undefined | FormValidation>();
const styles = useStyles();
@@ -22,7 +22,7 @@ import qs from 'qs';
*/
export const useFormDataFromQuery = (
initialState?: Record<string, JsonValue>,
) => {
): Record<string, JsonValue> => {
if (initialState) {
return initialState;
}