fi(SW-188): implement PR feedback
This commit is contained in:
@@ -30,8 +30,11 @@ export default async function IntroSection({
|
||||
)
|
||||
const lang = getLang()
|
||||
const formattedLocationText = `${streetAddress}, ${city} (${formattedDistanceText})`
|
||||
const hasTripAdvisorData =
|
||||
tripAdvisor?.rating && tripAdvisor?.numberOfReviews && tripAdvisor?.webUrl
|
||||
const hasTripAdvisorData = !!(
|
||||
tripAdvisor?.rating &&
|
||||
tripAdvisor?.numberOfReviews &&
|
||||
tripAdvisor?.webUrl
|
||||
)
|
||||
const formattedTripAdvisorText = hasTripAdvisorData
|
||||
? intl.formatMessage(
|
||||
{ id: "Tripadvisor reviews" },
|
||||
|
||||
@@ -35,11 +35,11 @@ export function RoomCard({
|
||||
return (
|
||||
<article className={styles.roomCard}>
|
||||
<button className={styles.imageWrapper} onClick={handleImageClick}>
|
||||
{badgeTextTransKey && (
|
||||
<span className={styles.badge}>
|
||||
{intl.formatMessage({ id: badgeTextTransKey })}
|
||||
</span>
|
||||
)}
|
||||
{/* {badgeTextTransKey && ( */}
|
||||
{/* <span className={styles.badge}> */}
|
||||
{/* {intl.formatMessage({ id: badgeTextTransKey })} */}
|
||||
{/* </span> */}
|
||||
{/* )} */}
|
||||
<span className={styles.imageCount}>
|
||||
<ImageIcon color="white" />
|
||||
{images.length}
|
||||
@@ -67,9 +67,7 @@ export function RoomCard({
|
||||
variant="underscored"
|
||||
onClick={handleRoomCtaClick}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "hotelPages.rooms.roomCard.seeRoomDetails",
|
||||
})}
|
||||
{intl.formatMessage({ id: "See room details" })}
|
||||
</Link>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
"Retype new password": "Retype new password",
|
||||
"Rooms": "Rooms",
|
||||
"Save": "Save",
|
||||
"See room details": "See room details",
|
||||
"Select a country": "Select a country",
|
||||
"Select country of residence": "Select country of residence",
|
||||
"Select date of birth": "Select date of birth",
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"How it works": "Hur det fungerar",
|
||||
"hotelPages.rooms.roomCard.person": "person",
|
||||
"hotelPages.rooms.roomCard.persons": "personer",
|
||||
"hotelPages.rooms.roomCard.seeRoomDetails": "Se rumsdetaljer",
|
||||
"See room details": "Se rumsdetaljer",
|
||||
"Join Scandic Friends": "Gå med i Scandic Friends",
|
||||
"Language": "Språk",
|
||||
"Level": "Nivå",
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
RequestOptionsWithJSONBody,
|
||||
RequestOptionsWithOutBody,
|
||||
} from "@/types/fetch"
|
||||
import type { Endpoint } from "./endpoints"
|
||||
import type { Endpoint, endpoints } from "./endpoints"
|
||||
|
||||
export { endpoints } from "./endpoints"
|
||||
|
||||
@@ -27,7 +27,7 @@ const fetch = fetchRetry(global.fetch, {
|
||||
})
|
||||
|
||||
export async function get(
|
||||
endpoint: Endpoint | `${Endpoint}/${string}`,
|
||||
endpoint: Endpoint | `${endpoints.v1.hotels}/${string}`,
|
||||
options: RequestOptionsWithOutBody,
|
||||
params?: URLSearchParams
|
||||
) {
|
||||
|
||||
@@ -19,11 +19,13 @@ const ratingsSchema = z
|
||||
}),
|
||||
})
|
||||
),
|
||||
reviews: z.object({
|
||||
widgetHtmlTagId: z.string(),
|
||||
widgetScriptEmbedUrlIframe: z.string(),
|
||||
widgetScriptEmbedUrlJavaScript: z.string(),
|
||||
}),
|
||||
reviews: z
|
||||
.object({
|
||||
widgetHtmlTagId: z.string(),
|
||||
widgetScriptEmbedUrlIframe: z.string(),
|
||||
widgetScriptEmbedUrlJavaScript: z.string(),
|
||||
})
|
||||
.optional(),
|
||||
}),
|
||||
})
|
||||
.optional()
|
||||
@@ -153,7 +155,7 @@ const detailedFacilitySchema = z.object({
|
||||
code: z.string().optional(),
|
||||
applyToAllHotels: z.boolean(),
|
||||
public: z.boolean(),
|
||||
icon: z.string(), //Check output.
|
||||
icon: z.string(),
|
||||
iconName: z.string().optional(),
|
||||
sortOrder: z.number(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user