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 { dt } from "@/lib/dt"
import { CalendarIcon, PersonIcon } from "@/components/Icons" import { CalendarIcon } from "@/components/Icons"
import Image from "@/components/Image" import Image from "@/components/Image"
import Caption from "@/components/TempDesignSystem/Text/Caption" import Caption from "@/components/TempDesignSystem/Text/Caption"
import Title from "@/components/TempDesignSystem/Text/Title" 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) { export default function StayCard({ stay, lang }: StayCardProps) {
const { checkinDate, checkoutDate, hotelInformation } = stay.attributes const { checkinDate, checkoutDate, hotelInformation } = stay.attributes
const { formatMessage } = useIntl()
const arrival = dt(checkinDate).locale(lang) const arrival = dt(checkinDate).locale(lang)
const arrivalDate = arrival.format("DD MMM") const arrivalDate = arrival.format("DD MMM")
const arrivalDateTime = arrival.format("YYYY-MM-DD") 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 departDate = depart.format("DD MMM YYYY")
const departDateTime = depart.format("YYYY-MM-DD") const departDateTime = depart.format("YYYY-MM-DD")
const tempGuestAmount = 3
return ( return (
<article className={styles.stay}> <article className={styles.stay}>
<Image <Image
@@ -37,21 +31,16 @@ export default function StayCard({ stay, lang }: StayCardProps) {
<Title as="h5" className={styles.hotel} level="h3"> <Title as="h5" className={styles.hotel} level="h3">
{hotelInformation.hotelName} {hotelInformation.hotelName}
</Title> </Title>
<div className={styles.information}>
<div className={styles.date}> <div className={styles.date}>
<CalendarIcon color="burgundy" className={styles.icon} /> <CalendarIcon color="burgundy" className={styles.icon} />
<Caption asChild> <Caption asChild>
<time dateTime={arrivalDateTime}>{arrivalDate}</time> <time dateTime={arrivalDateTime}>{arrivalDate}</time>
</Caption> </Caption>
{" - "} {" - "}
<Caption asChild> <Caption asChild>
<time dateTime={departDateTime}>{departDate}</time> <time dateTime={departDateTime}>{departDate}</time>
</Caption> </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> </div>
</footer> </footer>
</article> </article>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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