diff --git a/src/components/auth/GoogleAuthButton.tsx b/src/components/auth/GoogleAuthButton.tsx index b6bddab9e..8be062b2d 100644 --- a/src/components/auth/GoogleAuthButton.tsx +++ b/src/components/auth/GoogleAuthButton.tsx @@ -87,8 +87,6 @@ const GoogleAuthButton = ({ size="large" variant="tertiary" onClick={async () => { - // Ignored because error received here is a 500, and is not well formated for this use case - // @ts-ignore const { data, errors } = await getGoogleUrl() // Note: keep underscore notation for some error codes diff --git a/src/components/designSystem/Avatar.tsx b/src/components/designSystem/Avatar.tsx index 4657f056e..38142a8ef 100644 --- a/src/components/designSystem/Avatar.tsx +++ b/src/components/designSystem/Avatar.tsx @@ -52,12 +52,9 @@ const getBackgroundColorKey = (identifier?: string): keyof typeof colors.avatar return acc }, 0) - // From the modulo of the color number, get the modulo - const colorKeys = Object.keys(colors.avatar) - + const colorKeys = Object.keys(colors.avatar) as Array const colorIndex = charcodeSum % colorKeys.length - // @ts-expect-error return colorKeys[colorIndex] } diff --git a/src/components/designSystem/Popper.tsx b/src/components/designSystem/Popper.tsx index 1402670fe..cfeb3e79a 100644 --- a/src/components/designSystem/Popper.tsx +++ b/src/components/designSystem/Popper.tsx @@ -95,8 +95,9 @@ export const Popper = forwardRef( }, ref: openerRef, }) - : // @ts-expect-error - cloneElement(opener, { onClick: toggle, ref: openerRef })} + : !!opener + ? cloneElement(opener, { onClick: toggle, ref: openerRef }) + : null} (({ toast }: ToastProps, ref) => { const [closing, setClosing] = useState(false) - const timeoutRef = useRef(null) + const timeoutRef = useRef(null) const { translate } = useInternationalization() const { id, severity = ToastSeverityEnum.info, autoDismiss = true, message, translateKey } = toast @@ -41,7 +41,6 @@ export const Toast = forwardRef(({ toast }: ToastProps, re (time = AUTO_DISMISS_TIME) => { if (!autoDismiss) return - // @ts-expect-error timeoutRef.current = setTimeout(() => { setClosing(true) }, time) diff --git a/src/components/plans/ChargeAccordion.tsx b/src/components/plans/ChargeAccordion.tsx index 0765823f4..a85916171 100644 --- a/src/components/plans/ChargeAccordion.tsx +++ b/src/components/plans/ChargeAccordion.tsx @@ -232,7 +232,6 @@ export const ChargeAccordion = memo( hasDefaultPropertiesErrors: typeof chargeErrors === 'object' && typeof chargeErrors[index] === 'object' && - // @ts-ignore typeof chargeErrors[index].properties === 'object', hasErrorInCharges: Boolean(chargeErrors && chargeErrors[index]), initialLocalCharge: formikProps.initialValues.charges[index], diff --git a/src/core/serializers/serializePlanInput.ts b/src/core/serializers/serializePlanInput.ts index 58706a114..997098e43 100644 --- a/src/core/serializers/serializePlanInput.ts +++ b/src/core/serializers/serializePlanInput.ts @@ -43,7 +43,7 @@ const serializeProperties = (properties: Properties, chargeModel: ChargeModelEnu return { ...properties, ...([ChargeModelEnum.Standard, ChargeModelEnum.Dynamic].includes(chargeModel) - ? // @ts-ignore EDIT: groupedBy is a string at this stage. need to send string[] to BE + ? // @ts-expect-error EDIT: groupedBy is a string at this stage. need to send string[] to BE { groupedBy: !!properties?.groupedBy ? properties?.groupedBy.split(',') : undefined } : { groupedBy: undefined }), ...([ChargeModelEnum.Package, ChargeModelEnum.Standard].includes(chargeModel)