+
+
{agent.name}
-
- {agent.title}
+
+
+ {agent.job_title}
))}
diff --git a/components/landing-page/galery.tsx b/components/landing-page/galery.tsx
index adbc481..59d59fa 100644
--- a/components/landing-page/galery.tsx
+++ b/components/landing-page/galery.tsx
@@ -1,80 +1,89 @@
"use client";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import Image from "next/image";
-import { ChevronLeft, ChevronRight } from "lucide-react";
-
-const imagesPerPage = 6;
-
-const galleryImages = [
- "/gl1.png",
- "/gl-2-news.png",
- "/gl3.png",
- "/gl4.png",
- "/gl5.png",
- "/gl6.png",
- "/gl7.png",
- "/gl8.png",
- "/gl9.png",
-];
+import {
+ getAllGaleryFiles,
+ getGaleryData,
+ getGaleryFileData,
+} from "@/service/galery";
export default function GallerySection() {
- const [currentPage, setCurrentPage] = useState(1);
- const totalPages = Math.ceil(galleryImages.length / imagesPerPage);
+ const [data, setData] = useState
([]);
+ const [loading, setLoading] = useState(false);
- const paginatedImages = galleryImages.slice(
- (currentPage - 1) * imagesPerPage,
- currentPage * imagesPerPage
- );
+ const fetchData = async () => {
+ try {
+ setLoading(true);
+
+ // 1️⃣ Ambil gallery (ada status_id)
+ const galleryRes = await getGaleryData({
+ limit: "100",
+ page: 1,
+ search: "",
+ });
+
+ const galleries = galleryRes?.data?.data ?? [];
+
+ // hanya approved
+ const approvedGalleries = galleries.filter((g: any) => g.status_id === 2);
+
+ // 2️⃣ Ambil SEMUA files
+ const filesRes = await getAllGaleryFiles();
+ const files = filesRes?.data?.data ?? [];
+
+ // 3️⃣ Mapping gallery + file berdasarkan gallery_id
+ const merged = approvedGalleries.map((gallery: any) => {
+ const file = files.find((f: any) => f.gallery_id === gallery.id);
+
+ return {
+ ...gallery,
+ image_url: file?.image_url ?? null,
+ };
+ });
+
+ setData(merged);
+ } catch (err) {
+ console.error("Error fetch galeri:", err);
+ } finally {
+ setLoading(false);
+ }
+ };
+
+ useEffect(() => {
+ fetchData();
+ }, []);
return (
Galeri Kami
-
- {paginatedImages.map((img, index) => (
-
-
-
- ))}
-
-
-
-
- {[...Array(totalPages)].map((_, i) => (
-
- ))}
-
-
+ {loading ? (
+ Loading...
+ ) : (
+
+ {data.map((item: any) => (
+
+ {item.image_url ? (
+
+ ) : (
+
+ No Image
+
+ )}
+
+ ))}
+
+ )}
);
}
diff --git a/components/landing-page/header-about.tsx b/components/landing-page/header-about.tsx
index f3eed0a..ccfde4f 100644
--- a/components/landing-page/header-about.tsx
+++ b/components/landing-page/header-about.tsx
@@ -144,6 +144,41 @@ export default function HeaderAbout() {
/>
+
+
diff --git a/components/landing-page/header-product-j7-shs.tsx b/components/landing-page/header-product-j7-shs.tsx
index 9c4855d..d604686 100644
--- a/components/landing-page/header-product-j7-shs.tsx
+++ b/components/landing-page/header-product-j7-shs.tsx
@@ -14,28 +14,31 @@ import {
import { motion } from "framer-motion";
import { useState } from "react";
import { Download } from "lucide-react";
+import Link from "next/link";
-export default function HeaderProductJ7Shs() {
+export default function HeaderProductJ5Ev() {
const [open, setOpen] = useState(false);
const [selectedColorIndex, setSelectedColorIndex] = useState(0);
const [openBrosur, setOpenBrosur] = useState(false);
- const fileId = "1Nici3bdjUG524sUYQgHfbeO63xW6f1_o";
- const fileLink = `https://drive.google.com/file/d/${fileId}/view`;
- const embedLink = `https://drive.google.com/file/d/${fileId}/preview`;
- const downloadLink = `https://drive.google.com/uc?export=download&id=${fileId}`;
+ // const fileId = "1Nici3bdjUG524sUYQgHfbeO63xW6f1_o";
+ // const fileLink = `https://drive.google.com/file/d/${fileId}/view`;
+ // const embedLink = `https://drive.google.com/file/d/${fileId}/preview`;
+ // const downloadLink = `https://drive.google.com/uc?export=download&id=${fileId}`;
const images = [
- "/jj7-blue.png",
- "/jj7-white.png",
- "/jj7-silver.png",
- "/jj7-black.png",
+ "/j5-putih.png",
+ "/j5-hitam.png",
+ "/j5-silver.png",
+ "/j5-biru.png",
+ "/j5-hijau.png",
];
const gradients = [
- "linear-gradient(to bottom, #527D97, #527D97)",
"linear-gradient(to bottom, #FFFFFF, #FFFFFF)",
- "linear-gradient(to bottom, #E1ECF4, #FFFFFF)",
"linear-gradient(to bottom, #1A1A1A, #3A3A3A)",
+ "linear-gradient(to bottom, #B0B5C2, #B0B5C2)",
+ "linear-gradient(to bottom, #233a77, #233a77)",
+ "linear-gradient(to bottom, #5D6B4F, #5D6B4F)",
];
return (
<>
@@ -46,9 +49,9 @@ export default function HeaderProductJ7Shs() {
transition={{ duration: 0.8 }}
className="flex flex-col items-center gap-6"
>
-
+
diff --git a/components/landing-page/header-product-j8-awd.tsx b/components/landing-page/header-product-j8-awd.tsx
index 5e6152c..ef3cfab 100644
--- a/components/landing-page/header-product-j8-awd.tsx
+++ b/components/landing-page/header-product-j8-awd.tsx
@@ -14,15 +14,16 @@ import {
import { motion } from "framer-motion";
import { useState } from "react";
import { Download } from "lucide-react";
+import Link from "next/link";
export default function HeaderProductJ8Awd() {
const [open, setOpen] = useState(false);
const [selectedColorIndex, setSelectedColorIndex] = useState(0);
const [openBrosur, setOpenBrosur] = useState(false);
- const fileId = "1Nici3bdjUG524sUYQgHfbeO63xW6f1_o";
- const fileLink = `https://drive.google.com/file/d/${fileId}/view`;
- const embedLink = `https://drive.google.com/file/d/${fileId}/preview`;
- const downloadLink = `https://drive.google.com/uc?export=download&id=${fileId}`;
+ // const fileId = "1Nici3bdjUG524sUYQgHfbeO63xW6f1_o";
+ // const fileLink = `https://drive.google.com/file/d/${fileId}/view`;
+ // const embedLink = `https://drive.google.com/file/d/${fileId}/preview`;
+ // const downloadLink = `https://drive.google.com/uc?export=download&id=${fileId}`;
const images = ["/green.png", "/silver.png", "/white.png", "/black.png"];
@@ -52,7 +53,7 @@ export default function HeaderProductJ8Awd() {
/>
diff --git a/components/landing-page/items.tsx b/components/landing-page/items.tsx
index 44b54e6..2563a81 100644
--- a/components/landing-page/items.tsx
+++ b/components/landing-page/items.tsx
@@ -20,13 +20,13 @@ const items = [
image: "/new-car2.png",
title: "JAECOO J7 SHS-P",
description: "DELICATE OFF-ROAD SUV",
- link: "/product/j7-awd",
+ link: "/product/j7-shs-p",
},
{
- image: "/new-car1.png",
+ image: "/j5-ev-new.png",
title: "JAECOO J5 EV",
description: "SUPER HYBRID SYSTEM = SUPER HEV + EV",
- link: "/product/j7-shs",
+ link: "/product/j5-ev",
},
{
image: "/new-car3.png",
@@ -87,7 +87,7 @@ export default function Items() {
animate={{ opacity: 1, y: 0 }}
transition={{ delay: index * 0.25 + 0.6, duration: 0.6 }}
>
-
*/}
+
+
+
+
{car.name}