Merged in feature/SW-3515-join-scandic-friends-placeholder (pull request #2883)
feat(SW-3515): display placeholder for join scandic friends * feat(SW-3515): display placeholder for join scandic friends * add missing variant config Approved-by: Linus Flood
This commit is contained in:
@@ -12,6 +12,7 @@ import CountrySelect from "@scandic-hotels/design-system/Form/Country"
|
||||
import Phone from "@scandic-hotels/design-system/Form/Phone"
|
||||
import { useFormTracking } from "@scandic-hotels/tracking/useFormTracking"
|
||||
|
||||
import { useBookingFlowConfig } from "../../../../bookingFlowConfig/bookingFlowConfigContext"
|
||||
import { useRoomContext } from "../../../../contexts/EnterDetails/RoomContext"
|
||||
import useLang from "../../../../hooks/useLang"
|
||||
import { getFormattedCountryList } from "../../../../misc/getFormatedCountryList"
|
||||
@@ -29,6 +30,7 @@ const formID = "enter-details"
|
||||
export default function Details() {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const config = useBookingFlowConfig()
|
||||
|
||||
const { addPreSubmitCallback, rooms } = useEnterDetailsStore((state) => ({
|
||||
addPreSubmitCallback: state.actions.addPreSubmitCallback,
|
||||
@@ -205,7 +207,11 @@ export default function Details() {
|
||||
<CountrySelect
|
||||
className={styles.fullWidth}
|
||||
countries={getFormattedCountryList(intl)}
|
||||
errorMessage={getErrorMessage(intl, errors.countryCode?.message)}
|
||||
errorMessage={getErrorMessage(
|
||||
intl,
|
||||
config.variant,
|
||||
errors.countryCode?.message
|
||||
)}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Country",
|
||||
})}
|
||||
@@ -227,7 +233,11 @@ export default function Details() {
|
||||
})}
|
||||
countriesWithTranslatedName={getFormattedCountryList(intl)}
|
||||
defaultCountryCode={getDefaultCountryFromLang(lang)}
|
||||
errorMessage={getErrorMessage(intl, errors.phoneNumber?.message)}
|
||||
errorMessage={getErrorMessage(
|
||||
intl,
|
||||
config.variant,
|
||||
errors.phoneNumber?.message
|
||||
)}
|
||||
className={styles.fullWidth}
|
||||
label={intl.formatMessage({
|
||||
defaultMessage: "Phone number",
|
||||
|
||||
Reference in New Issue
Block a user