Almost updated
This commit is contained in:
@ -2,9 +2,10 @@ import React from "react";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { services2 } from "@/data/services";
|
||||
|
||||
export default function Services() {
|
||||
return (
|
||||
<div className="section tf-spacing-46 pb-0">
|
||||
<div className="section tf-spacing-46 pb-0" style={{ backgroundColor: "#fff" }}>
|
||||
<div className="tf-container">
|
||||
<div className="heading-section d-flex gap_12 justify-content-between align-items-end flex-wrap-md mb_57">
|
||||
<div className="left">
|
||||
@ -24,17 +25,9 @@ export default function Services() {
|
||||
to you, avoiding unnecessary expenses
|
||||
</p>
|
||||
</div>
|
||||
<div className="right">
|
||||
<Link
|
||||
href={`/#`}
|
||||
className="tf-btn height-3 rounded-12 btn-px-28"
|
||||
>
|
||||
<span>See our services</span>
|
||||
<span className="bg-effect" />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="tf-grid-layout lg-col-3">
|
||||
{/* Updated for 3x2 grid layout */}
|
||||
<div className="tf-grid-layout lg-col-3 md-col-2 sm-col-1">
|
||||
{services2.map((service, index) => (
|
||||
<div
|
||||
key={index}
|
||||
@ -54,13 +47,21 @@ export default function Services() {
|
||||
</Link>
|
||||
</h3>
|
||||
<p className="text-body-1 mb_23">{service.description}</p>
|
||||
<Link
|
||||
href={`/service-details/${service.id}`}
|
||||
className="tf-btn-link"
|
||||
>
|
||||
<span> Learn more </span>
|
||||
<i className="icon-arrow-top-right"> </i>
|
||||
</Link>
|
||||
{/* Conditionally render Learn more - disabled for Construction (id: 16) */}
|
||||
{service.id !== 16 ? (
|
||||
<Link
|
||||
href={`/service-details/${service.id}`}
|
||||
className="tf-btn-link"
|
||||
>
|
||||
<span> Learn more </span>
|
||||
<i className="icon-arrow-top-right"> </i>
|
||||
</Link>
|
||||
) : (
|
||||
<span className="tf-btn-link disabled" style={{ opacity: 0.5, cursor: 'not-allowed' }}>
|
||||
<span> Learn more </span>
|
||||
<i className="icon-arrow-top-right"> </i>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div
|
||||
className="item scroll-tranform"
|
||||
@ -80,4 +81,4 @@ export default function Services() {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user