chore: update my stays to new MVP design
This commit is contained in:
@@ -7,14 +7,9 @@ import styles from "./stay.module.css"
|
||||
|
||||
import type { StayCardProps } from "@/types/components/myPages/myStays/stayCard"
|
||||
|
||||
export default function StayCard({
|
||||
stay,
|
||||
lang,
|
||||
shouldShowDayCount = false,
|
||||
}: StayCardProps) {
|
||||
export default function StayCard({ stay, lang }: StayCardProps) {
|
||||
const { dateArrive, dateDepart, guests, hotel } = stay
|
||||
|
||||
const daysUntilArrival = dt(dateArrive).diff(dt(), "days")
|
||||
const arrival = dt(dateArrive).locale(lang)
|
||||
const arrivalDate = arrival.format("DD MMM")
|
||||
const arrivalDateTime = arrival.format("YYYY-MM-DD")
|
||||
@@ -24,21 +19,14 @@ export default function StayCard({
|
||||
|
||||
return (
|
||||
<article className={styles.stay}>
|
||||
<div className={styles.imageContainer}>
|
||||
{shouldShowDayCount ? (
|
||||
<div className={styles.badge}>
|
||||
<time className={styles.time}>In {daysUntilArrival} days</time>
|
||||
</div>
|
||||
) : null}
|
||||
<Image
|
||||
alt="Placeholder image flower"
|
||||
height={73}
|
||||
src="/_static/icons/flower-image.svg"
|
||||
width={73}
|
||||
/>
|
||||
</div>
|
||||
<footer className={styles.footer}>
|
||||
<Title as="h5" level="h3" uppercase className={styles.hotel}>
|
||||
<Title
|
||||
as="h5"
|
||||
level="h3"
|
||||
weight="semiBold"
|
||||
uppercase
|
||||
className={styles.hotel}
|
||||
>
|
||||
{hotel}
|
||||
</Title>
|
||||
<section className={styles.container}>
|
||||
|
||||
Reference in New Issue
Block a user