From 17936a82b53e0775392cebf872e43568903f3c1e Mon Sep 17 00:00:00 2001 From: Ilya Beda Date: Thu, 5 Oct 2023 13:04:19 +1100 Subject: [PATCH] Fix antd-phone-input import https://github.com/vitejs/vite/issues/2139 --- .../widgets/PhoneInput/index.tsx | 6 +++++- yarn.lock | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/BaseQuestionnaireResponseForm/widgets/PhoneInput/index.tsx b/src/components/BaseQuestionnaireResponseForm/widgets/PhoneInput/index.tsx index 1b833659..d89f098c 100644 --- a/src/components/BaseQuestionnaireResponseForm/widgets/PhoneInput/index.tsx +++ b/src/components/BaseQuestionnaireResponseForm/widgets/PhoneInput/index.tsx @@ -4,6 +4,10 @@ import { QuestionItemProps } from 'sdc-qrf'; import { useFieldController } from '../../hooks'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const PhoneInputFixed: typeof PhoneInput = PhoneInput.default ? PhoneInput.default : PhoneInput; + export function QuestionPhone({ parentPath, questionItem }: QuestionItemProps) { const { linkId } = questionItem; const fieldName = [...parentPath, linkId, 0, 'value', 'string']; @@ -11,7 +15,7 @@ export function QuestionPhone({ parentPath, questionItem }: QuestionItemProps) { return ( -