feat: remove guest amount information

This commit is contained in:
Fredrik Thorsson
2024-06-30 21:05:05 +02:00
parent 0c832078a3
commit 032022dd52
9 changed files with 24 additions and 53 deletions

View File

@@ -1,9 +1,6 @@
"use client"
import { useIntl } from "react-intl"
import { dt } from "@/lib/dt"
import { CalendarIcon, PersonIcon } from "@/components/Icons"
import { CalendarIcon } from "@/components/Icons"
import Image from "@/components/Image"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import Title from "@/components/TempDesignSystem/Text/Title"
@@ -14,7 +11,6 @@ import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
export default function StayCard({ stay, lang }: StayCardProps) {
const { checkinDate, checkoutDate, hotelInformation } = stay.attributes
const { formatMessage } = useIntl()
const arrival = dt(checkinDate).locale(lang)
const arrivalDate = arrival.format("DD MMM")
const arrivalDateTime = arrival.format("YYYY-MM-DD")
@@ -22,8 +18,6 @@ export default function StayCard({ stay, lang }: StayCardProps) {
const departDate = depart.format("DD MMM YYYY")
const departDateTime = depart.format("YYYY-MM-DD")
const tempGuestAmount = 3
return (
<article className={styles.stay}>
<Image
@@ -37,21 +31,16 @@ export default function StayCard({ stay, lang }: StayCardProps) {
<Title as="h5" className={styles.hotel} level="h3">
{hotelInformation.hotelName}
</Title>
<div className={styles.information}>
<div className={styles.date}>
<CalendarIcon color="burgundy" className={styles.icon} />
<Caption asChild>
<time dateTime={arrivalDateTime}>{arrivalDate}</time>
</Caption>
{" - "}
<Caption asChild>
<time dateTime={departDateTime}>{departDate}</time>
</Caption>
</div>
<div className={styles.guest}>
<PersonIcon color="burgundy" className={styles.icon} />
<Caption>{`${tempGuestAmount} ${tempGuestAmount > 1 ? formatMessage({ id: "Guests" }) : formatMessage({ id: "Guest" })}`}</Caption>
</div>
<div className={styles.date}>
<CalendarIcon color="burgundy" className={styles.icon} />
<Caption asChild>
<time dateTime={arrivalDateTime}>{arrivalDate}</time>
</Caption>
{" - "}
<Caption asChild>
<time dateTime={departDateTime}>{departDate}</time>
</Caption>
</div>
</footer>
</article>

View File

@@ -32,13 +32,7 @@
text-wrap: nowrap;
}
.information {
display: flex;
gap: var(--Spacing-x2);
}
.date,
.guest {
.date {
align-items: center;
display: flex;
gap: var(--Spacing-x-half);

View File

@@ -234,23 +234,23 @@ a.default {
}
.baseText {
color: var(--Base-Button-Text-On-Fill-Normal, #4d001b);
color: var(--Base-Button-Text-On-Fill-Normal);
}
.baseText:active,
.baseText:focus,
.baseText:hover {
color: var(--Base-Button-Text-On-Fill-Hover, #8f4350);
color: var(--Base-Button-Text-On-Fill-Hover);
text-decoration: underline;
}
.baseText:disabled {
color: var(--Base-Button-Text-On-Fill-Disabled, #a8a4a2);
color: var(--Base-Button-Text-On-Fill-Disabled);
}
.icon.baseText svg,
.icon.baseText svg * {
fill: var(--Base-Button-Text-On-Fill-Normal, #4d001b);
fill: var(--Base-Button-Text-On-Fill-Normal);
}
.icon.baseText:active svg,
@@ -259,13 +259,13 @@ a.default {
.icon.baseText:active svg *,
.icon.baseText:focus svg *,
.icon.baseText:hover svg * {
fill: var(--Base-Button-Text-On-Fill-Hover, #8f4350);
fill: var(--Base-Button-Text-On-Fill-Hover);
text-decoration: underline;
}
.icon.baseText:disabled svg,
.icon.baseText:disabled svg * {
fill: var(--Base-Button-Text-On-Fill-Disabled, #a8a4a2);
fill: var(--Base-Button-Text-On-Fill-Disabled);
}
.primaryStrongPrimary {

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "Du har ingen kommende ophold.",
"Your Challenges Conquer & Earn!": "Dine udfordringer Overvind og tjen!",
"Your level": "Dit niveau",
"Zip code": "Postnummer",
"Guest": "Gæst",
"Guests": "Gæster"
"Zip code": "Postnummer"
}

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "Sie haben keine bevorstehenden Aufenthalte.",
"Your Challenges Conquer & Earn!": "Meistern Sie Ihre Herausforderungen und verdienen Sie Geld!",
"Your level": "Dein ebene",
"Zip code": "PLZ",
"Guest": "Gast",
"Guests": "Gäste"
"Zip code": "PLZ"
}

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "You have no upcoming stays.",
"Your Challenges Conquer & Earn!": "Your Challenges Conquer & Earn!",
"Your level": "Your level",
"Zip code": "Zip code",
"Guest": "Guest",
"Guests": "Guests"
"Zip code": "Zip code"
}

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "Sinulla ei ole tulevia oleskeluja.",
"Your Challenges Conquer & Earn!": "Voita ja ansaitse haasteesi!",
"Your level": "Tasosi",
"Zip code": "Postinumero",
"Guest": "Vieras",
"Guests": "Vieraita"
"Zip code": "Postinumero"
}

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "Du har ingen kommende opphold.",
"Your Challenges Conquer & Earn!": "Dine utfordringer Erobre og tjen!",
"Your level": "Ditt nivå",
"Zip code": "Post kode",
"Guest": "Gjest",
"Guests": "Gjester"
"Zip code": "Post kode"
}

View File

@@ -90,7 +90,5 @@
"You have no upcoming stays.": "Du har inga kommande vistelser.",
"Your Challenges Conquer & Earn!": "Dina utmaningar Erövra och tjäna!",
"Your level": "Din nivå",
"Zip code": "Postnummer",
"Guest": "Gäst",
"Guests": "Gäster"
"Zip code": "Postnummer"
}