feat(SW-880): refactor getType
This commit is contained in:
committed by
Joakim Jäderberg
parent
cf9b2d7fc0
commit
c7d285de74
@@ -2,15 +2,22 @@ import { getIntl } from "@/i18n"
|
||||
|
||||
export async function getType(type: string) {
|
||||
const intl = await getIntl()
|
||||
|
||||
/* TODO: Get full list of types */
|
||||
const outdoorPool = intl.formatMessage({ id: "Outdoor pool" })
|
||||
const sauna = intl.formatMessage({ id: "Sauna" })
|
||||
const relax = intl.formatMessage({ id: "Relax" })
|
||||
const gym = intl.formatMessage({ id: "Gym" })
|
||||
|
||||
switch (type) {
|
||||
case "OutdoorPool":
|
||||
return intl.formatMessage({ id: "Outdoor pool" })
|
||||
return outdoorPool
|
||||
case "Sauna":
|
||||
return intl.formatMessage({ id: "Sauna" })
|
||||
return sauna
|
||||
case "Relax":
|
||||
return intl.formatMessage({ id: "Relax" })
|
||||
return relax
|
||||
case "Gym":
|
||||
return intl.formatMessage({ id: "Gym" })
|
||||
return gym
|
||||
default:
|
||||
return type
|
||||
}
|
||||
|
||||
@@ -55,7 +55,9 @@ export default async function WellnessAndExerciseSidePeek({
|
||||
? `${intl.formatMessage({ id: "Sat-Sun" })} ${intl.formatMessage({ id: "Always open" })}`
|
||||
: `${intl.formatMessage({ id: "Sat-Sun" })} ${facility.openingDetails.openingHours.weekends.openingTime}-${facility.openingDetails.openingHours.weekends.closingTime}`}
|
||||
</Body>
|
||||
<Body>Placeholder text</Body>
|
||||
<Body>
|
||||
{/* TODO: Determine what details should be displayed about the facility type */}
|
||||
</Body>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user