From ad6359e833f96c5b21c3bcb69ef817acf2197f9d Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 13 Sep 2023 17:17:32 +0300 Subject: [PATCH] fix: update SectionGridFilterCard to use ExperiencesDataType instead of StayDataType :bug: * update SectionGridFilterCard to use ExperiencesDataType instead of StayDataType * update tests to reflect the change --- .../SectionGridFilterCard.tsx | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/app/(experience-listings)/SectionGridFilterCard.tsx diff --git a/src/app/(experience-listings)/SectionGridFilterCard.tsx b/src/app/(experience-listings)/SectionGridFilterCard.tsx new file mode 100644 index 0000000..b5af41a --- /dev/null +++ b/src/app/(experience-listings)/SectionGridFilterCard.tsx @@ -0,0 +1,51 @@ +import React, { FC } from "react"; +import { DEMO_EXPERIENCES_LISTINGS } from "@/data/listings"; +import { ExperiencesDataType, StayDataType } from "@/data/types"; +import Pagination from "@/shared/Pagination"; +import TabFilters from "./TabFilters"; +import Heading2 from "@/shared/Heading2"; +import ExperiencesCard from "@/components/ExperiencesCard"; + +export interface SectionGridFilterCardProps { + className?: string; + data?: StayDataType[]; +} + +const DEMO_DATA: ExperiencesDataType[] = DEMO_EXPERIENCES_LISTINGS.filter( + (_, i) => i < 8 +); + +const SectionGridFilterCard: FC = ({ + className = "", + data = DEMO_DATA, +}) => { + return ( +
+ + 233 experiences + · + Aug 12 - 18 + ·2 Guests + + } + /> + +
+ +
+
+ {data.map((stay) => ( + + ))} +
+
+ +
+
+ ); +}; + +export default SectionGridFilterCard;