Browse Source

🛠️ Refactor component structure for better organization.

📦 Add missing comments for code clarity.
 Test and validate component functionality.
🎨 Update styling for improved UI.
🚧 Work in progress: Implement new features.
📝 Update documentation and comments.
🐛 Fix minor bugs in the component.
⚙️ Configure environment settings.
🔄 Merge feature branch into main.
main
John Doe 1 year ago
parent
commit
e3afd8e92b
  1. 48
      src/app/(car-listings)/SectionGridFilterCard.tsx

48
src/app/(car-listings)/SectionGridFilterCard.tsx

@ -0,0 +1,48 @@
import React, { FC } from "react";
import { DEMO_CAR_LISTINGS } from "@/data/listings";
import { CarDataType } from "@/data/types";
import Pagination from "@/shared/Pagination";
import TabFilters from "./TabFilters";
import Heading2 from "@/shared/Heading2";
import CarCard from "@/components/CarCard";
export interface SectionGridFilterCardProps {
className?: string;
data?: CarDataType[];
}
const DEMO_DATA: CarDataType[] = DEMO_CAR_LISTINGS.filter((_, i) => i < 12);
const SectionGridFilterCard: FC<SectionGridFilterCardProps> = ({
className = "",
data = DEMO_DATA,
}) => {
return (
<div className={`nc-SectionGridFilterCard ${className}`}>
<Heading2
heading="Cars in Tokyo"
subHeading={
<span className="block text-neutral-500 dark:text-neutral-400 mt-3">
233 cars
<span className="mx-2">·</span>
Aug 12 - 18
</span>
}
/>
<div className="mb-8 lg:mb-11">
<TabFilters />
</div>
<div className="grid grid-cols-1 gap-6 md:gap-8 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
{data.map((car) => (
<CarCard key={car.id} data={car} />
))}
</div>
<div className="flex mt-16 justify-center items-center">
<Pagination />
</div>
</div>
);
};
export default SectionGridFilterCard;
Loading…
Cancel
Save