Merged in chore/SW-3145-move-country (pull request #2545)

chore: SW-3145 Moved country into design system

* chore: SW-3145 Moved country into design system


Approved-by: Anton Gunnarsson
This commit is contained in:
Hrishikesh Vaipurkar
2025-07-10 12:20:49 +00:00
parent 5f9af2701e
commit 2f72a0437b
27 changed files with 229 additions and 136 deletions

View File

@@ -4,10 +4,14 @@ import { useFormContext } from "react-hook-form"
import { useIntl } from "react-intl"
import Body from "@scandic-hotels/design-system/Body"
import CountrySelect from "@scandic-hotels/design-system/Form/Country"
import { signupErrors } from "@scandic-hotels/trpc/routers/user/schemas"
import CountrySelect from "@/components/TempDesignSystem/Form/Country"
import Input from "@/components/TempDesignSystem/Form/Input"
import Phone from "@/components/TempDesignSystem/Form/Phone"
import useLang from "@/hooks/useLang"
import { getFormattedCountryList } from "@/utils/countries"
import { getErrorMessage } from "@/utils/getErrorMessage"
import styles from "./modifyContact.module.css"
@@ -23,6 +27,7 @@ export default function ModifyContact({
isFirstStep,
}: ModifyContactProps) {
const intl = useIntl()
const lang = useLang()
const { getValues, setValue } = useFormContext()
useEffect(() => {
@@ -57,9 +62,15 @@ export default function ModifyContact({
</div>
<div className={styles.row}>
<CountrySelect
countries={getFormattedCountryList(intl)}
errorMessage={getErrorMessage(
intl,
signupErrors.COUNTRY_REQUIRED
)}
label={intl.formatMessage({
defaultMessage: "Country",
})}
lang={lang}
name="countryCode"
/>
</div>