fix(striker-ui): resolve type errors during build

main
Tsu-ba-me 11 months ago
parent ac4571f321
commit 4c7792f17b
  1. 2
      striker-ui/components/ManageMailRecipient/AlertOverrideInputGroup.tsx
  2. 4
      striker-ui/components/ManageMailRecipient/ManageAlertOverride.tsx
  3. 8
      striker-ui/hooks/useFormikUtils.ts

@ -118,7 +118,7 @@ const AlertOverrideInputGroup: FC<AlertOverrideInputGroupProps> = (props) => {
if (alertOverride.uuids) {
formik.setFieldValue(removeChain, true, true);
} else {
formik.setValues((previous) => {
formik.setValues((previous: MailRecipientFormikValues) => {
const shallow = { ...previous };
const { [mrUuid]: mr } = shallow;
const { [aoVid]: remove, ...keep } = mr.alertOverrides;

@ -31,7 +31,7 @@ const ManageAlertOverride: FC<ManageAlertOverrideProps> = (props) => {
* _n_ is the number of subnodes per node. */
const valueId = uuidv4();
formik.setValues((previous) => {
formik.setValues((previous: MailRecipientFormikValues) => {
const shallow = { ...previous };
const { [mrUuid]: mr } = shallow;
@ -43,7 +43,7 @@ const ManageAlertOverride: FC<ManageAlertOverrideProps> = (props) => {
return shallow;
});
}}
renderListItem={(valueId, value) =>
renderListItem={(valueId, value: AlertOverrideFormikAlertOverride) =>
!value.remove && (
<AlertOverrideInputGroup
alertOverrideTargetOptions={alertOverrideTargetOptions}

@ -1,16 +1,14 @@
import { OutlinedInputProps } from '@mui/material';
import { FormikValues, useFormik } from 'formik';
import { FormikConfig, FormikValues, useFormik } from 'formik';
import { useCallback, useMemo } from 'react';
import debounce from '../lib/debounce';
import getFormikErrorMessages from '../lib/getFormikErrorMessages';
const useFormikUtils = <Values extends FormikValues = FormikValues>(
...formikArgs: Parameters<UseFormik<Values>>
formikConfig: FormikConfig<Values>,
): FormikUtils<Values> => {
const [formikConfig, ...restFormikArgs] = formikArgs;
const formik = useFormik<Values>({ ...formikConfig }, ...restFormikArgs);
const formik = useFormik<Values>({ ...formikConfig });
const getFieldChanged = useCallback(
(field: string) => {

Loading…
Cancel
Save