Skip to content

Commit

Permalink
Merge pull request #306 from AppQuality/develop
Browse files Browse the repository at this point in the history
Release 20241002
  • Loading branch information
d-beezee authored Oct 2, 2024
2 parents e2fcdc8 + 8b23a4a commit 7155ab3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@sentry/react": "^7.83.0",
"date-fns": "^2.30.0",
"formik": "^2.2.6",
"i18n-iso-countries": "^6.7.0",
"i18n-iso-countries": "7.12.0",
"i18next": "^20.2.2",
"i18next-browser-languagedetector": "^6.1.0",
"lzutf8": "^0.6.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { SelectSelectionFormField } from "./SelectSelectionFormField";
import { MultiSelectionFormField } from "./MultiSelectionFormField";
import { TextSelectionFormField } from "src/pages/PreviewSelectionForm/SelectionForm/SelectionFormFields/TextSelectionFormField";
import { RadioSelectionFormField } from "./RadioSelectionFormField";
import { AddressFields } from "./AddressFields";
import countries from "i18n-iso-countries";
import { Option } from "@appquality/appquality-design-system/dist/stories/select/_types";
import countries from "i18n-iso-countries";
import { useTranslation } from "react-i18next";
import { TextSelectionFormField } from "src/pages/PreviewSelectionForm/SelectionForm/SelectionFormFields/TextSelectionFormField";
import { useAppSelector } from "src/store";
import { AddressFields } from "./AddressFields";
import { MultiSelectionFormField } from "./MultiSelectionFormField";
import { RadioSelectionFormField } from "./RadioSelectionFormField";
import { SelectSelectionFormField } from "./SelectSelectionFormField";
import useNotAboveOption from "./useNotAboveOption";
import { useTranslation } from "react-i18next";

interface SelectionFormFieldsProps {
genderOptions: Option[];
Expand Down Expand Up @@ -57,7 +57,10 @@ export const SelectionFormFields = ({
};

const getCountryCode = (value?: any) => {
if ("country" in value) return countries.getAlpha2Code(value.country, "en");
if ("country" in value) {
const country = countries.getAlpha2Code(value.country, "en");
if (country) return country;
}
return "";
};

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7756,10 +7756,10 @@ husky@^6.0.0:
resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e"
integrity sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==

i18n-iso-countries@^6.7.0:
version "6.8.0"
resolved "https://registry.yarnpkg.com/i18n-iso-countries/-/i18n-iso-countries-6.8.0.tgz#eebbc75594c6832aff86176c1bb38daa133d6dfd"
integrity sha512-jJs/+CA6+VUICFxqGcB0vFMERGfhfvyNk+8Vb9EagSZkl7kSpm/kT0VyhvzM/zixDWEV/+oN9L7v/GT9BwzoGg==
i18n-iso-countries@7.12.0:
version "7.12.0"
resolved "https://registry.npmjs.org/i18n-iso-countries/-/i18n-iso-countries-7.12.0.tgz#e189d85a505ee025f0f48b5ccc35fa66c436e99c"
integrity sha512-NDFf5j/raA5JrcPT/NcHP3RUMH7TkdkxQKAKdvDlgb+MS296WJzzqvV0Y5uwavSm7A6oYvBeSV0AxoHdDiHIiw==
dependencies:
diacritics "1.3.0"

Expand Down

0 comments on commit 7155ab3

Please sign in to comment.