'use client' import React, { useState } from "react"; import {directoryData} from "@/utility/constant.utils" export default function Section1() { const categories = Object.keys(directoryData); const [selectedCategory, setSelectedCategory] = useState(categories[0]); const tableHeaders = [ "Services", "Name", "Phone", "Service Area", "Location", "Website" ]; return ( <> {/*===== BLOG AREA STARTS =======*/}

Business Directory

    {categories.map((cat) => (
  • ))}
{tableHeaders.map((header) => ( ))} {(directoryData[selectedCategory] || []).length === 0 ? ( ) : ( directoryData[selectedCategory].map((row, idx) => ( )) )}
{header}
No data available for this category.
{row.services} {row.name} {row.phone} {row.serviceArea} {row.location} Website
{/*===== BLOG AREA ENDS =======*/} ) }