chore: add load more functionality, with refactored css

This commit is contained in:
Matilda Landström
2024-04-26 10:51:05 +02:00
parent 204f0f45ce
commit 7480b212e2
31 changed files with 326 additions and 169 deletions

View File

@@ -5,12 +5,12 @@ import Title from "@/components/MyPages/Title"
import styles from "./stay.module.css"
import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
import type { StayCardProps } from "@/types/components/myPages/myStays/stayCard"
export default function StayCard({
stay,
lang,
showDayCount = false,
shouldShowDayCount = false,
}: StayCardProps) {
const { dateArrive, dateDepart, guests, hotel } = stay
@@ -25,7 +25,7 @@ export default function StayCard({
return (
<article className={styles.stay}>
<div className={styles.imageContainer}>
{showDayCount ? (
{shouldShowDayCount ? (
<div className={styles.badge}>
<time className={styles.time}>In {daysUntilArrival} days</time>
</div>