From fc11f69c36f6fcce444688c40a2187d71ea1b649 Mon Sep 17 00:00:00 2001 From: Dosseh91 <98787470+Dosseh91@users.noreply.github.com> Date: Wed, 17 Dec 2025 22:56:12 +0100 Subject: [PATCH] Refactor Categories --- src/pages/Categories.tsx | 103 ++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 38 deletions(-) diff --git a/src/pages/Categories.tsx b/src/pages/Categories.tsx index 263f657..f7262f1 100644 --- a/src/pages/Categories.tsx +++ b/src/pages/Categories.tsx @@ -1,52 +1,79 @@ -import { Link } from 'react-router-dom'; +import { Link } from "react-router-dom"; +import { Tag } from "lucide-react"; -interface Category { - id: string; - name: string; - description?: string; -} - -const categories: Category[] = [ - { id: 'apartments', name: 'Apartments' }, - { id: 'houses', name: 'Houses' }, - { id: 'commercial', name: 'Commercial' }, - { id: 'land', name: 'Land' }, - { id: 'luxury', name: 'Luxury' } +const categories = [ + { + key: "real-estate", + title: "Real Estate", + description: "Homes, apartments, land, and commercial properties", + }, + { + key: "vehicles", + title: "Vehicles", + description: "Cars, motorcycles, boats, and other vehicles", + }, + { + key: "electronics", + title: "Electronics", + description: "Computers, phones, TVs, and other electronic devices", + }, + { + key: "furniture", + title: "Furniture", + description: "Home and office furniture, decor, and appliances", + }, + { + key: "jobs", + title: "Jobs", + description: "Job listings and career opportunities", + }, + { + key: "services", + title: "Services", + description: "Professional services and skilled trades", + }, ]; -const Categories = () => { +export default function Categories() { return ( -
-

Categories

+
+

+ Browse by Category +

+

+ Explore our wide range of categories to find exactly what you're looking for +

-
- {categories.map(category => ( +
+ {categories.map((category) => ( -

{category.name}

- {category.description &&

{category.description}

} +
+
+ +
+ +
+

+ {category.title} +

+

+ {category.description} +

+
+
+ + + → + ))}
); -}; +} export default Categories; -