"use client"; import { useState, useEffect } from "react"; import Image from "next/legacy/image"; import Link from "next/link"; import { getValidImageUrl, FALLBACK_IMAGES } from "@/lib/imageUtils"; import { useServices } from "@/lib/hooks/useServices"; import { serviceUtils } from "@/lib/api/serviceService"; const ServiceMain = () => { // Fetch services from API const { services, loading, error } = useServices(); // Show loading state if (loading) { return (
Loading...

Loading services...

); } // Show error state if (error) { return (

Error Loading Services

{error}

); } // Show empty state if (!services || services.length === 0) { return (

No Services Available

We're working on adding new services. Please check back later.

); } return (
Our Services

Professional Software Development Services

We deliver comprehensive technology solutions tailored to your business needs

{services.map((service, index) => (
{service.title}
Learn More
{String(index + 1).padStart(2, '0')} {service.category && ( {service.category.name} )}

{service.title}

{service.short_description || service.description}

View Details
))}
); }; export default ServiceMain;