+
{agents.map((agent, index) => (
-
+
+
{agent.name}
-
- {agent.title}
+
+
+ {agent.job_title}
))}
diff --git a/components/landing-page/galery.tsx b/components/landing-page/galery.tsx
index 33b00b7..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",
- "/gl2-new.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) => (
-
-
-
- ))}
-
-
-
- setCurrentPage((prev) => Math.max(prev - 1, 1))}
- disabled={currentPage === 1}
- className="p-2 rounded-md hover:bg-gray-200 disabled:opacity-30"
- >
-
-
- {[...Array(totalPages)].map((_, i) => (
- setCurrentPage(i + 1)}
- className={`w-8 h-8 rounded-md border text-sm ${
- currentPage === i + 1
- ? "bg-[#1F6779] text-white"
- : "text-gray-700 hover:bg-gray-100"
- }`}
- >
- {i + 1}
-
- ))}
-
- setCurrentPage((prev) => Math.min(prev + 1, totalPages))
- }
- disabled={currentPage === totalPages}
- className="p-2 rounded-md hover:bg-gray-200 disabled:opacity-30"
- >
-
-
-
+ {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 8ceb679..f8543bd 100644
--- a/components/landing-page/header-about.tsx
+++ b/components/landing-page/header-about.tsx
@@ -144,6 +144,42 @@ export default function HeaderAbout() {
/>
+ {/* ===== Static Gallery Section ===== */}
+
+
+ Best Sales of The Month & SPV of The Month
+
+
+
+ {["/Asset18.png", "/Asset19.png", "/Asset20.png", "/Asset21.png"].map(
+ (src, index) => (
+
+
+
+ ),
+ )}
+
+
);
}
diff --git a/components/landing-page/header-product-j7-awd.tsx b/components/landing-page/header-product-j7-awd.tsx
index 305c949..0c64a02 100644
--- a/components/landing-page/header-product-j7-awd.tsx
+++ b/components/landing-page/header-product-j7-awd.tsx
@@ -14,6 +14,7 @@ import {
import { motion } from "framer-motion";
import { useState } from "react";
import { Download } from "lucide-react";
+import Link from "next/link";
export default function HeaderProductJ7Awd() {
const [open, setOpen] = useState(false);
@@ -57,81 +58,25 @@ export default function HeaderProductJ7Awd() {
/>
{/* Tombol di dalam gambar, posisi bawah tengah */}
+
diff --git a/components/landing-page/header-product-j7-shs.tsx b/components/landing-page/header-product-j7-shs.tsx
index 2f10aa8..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", // index 0
- "/jj7-white.png", // index 1
- "/jj7-silver.png", // index 2
- "/jj7-black.png", // index 3
+ "/j5-putih.png",
+ "/j5-hitam.png",
+ "/j5-silver.png",
+ "/j5-biru.png",
+ "/j5-hijau.png",
];
const gradients = [
- "linear-gradient(to bottom, #527D97, #527D97)", // Hijau
- "linear-gradient(to bottom, #FFFFFF, #FFFFFF)", // Silver
- "linear-gradient(to bottom, #E1ECF4, #FFFFFF)", // Putih
- "linear-gradient(to bottom, #1A1A1A, #3A3A3A)", // Hitam
+ "linear-gradient(to bottom, #FFFFFF, #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"
>
-
+
- {/* Tombol di dalam gambar, posisi bawah tengah */}
- {/* Section warna */}
@@ -56,9 +52,8 @@ export default function HeaderProductJ8Awd() {
priority
/>
- {/* Tombol di dalam gambar, posisi bawah tengah */}
- {/* Section warna */}
-
+ {/*
TEST DRIVE
@@ -109,7 +109,7 @@ export default function Items() {
- {/* Form */}
+
@@ -130,7 +130,15 @@ export default function Items() {
-
+ */}
+
+
+ TEST DRIVE
+
+
+
{car.name}
-
-
-
- TEST DRIVE
-
-
-
-
-
-
-
-
- FORM TEST DRIVE
-
-
-
- {/* Form */}
-
-
-
-
-
-
-
-
-
-
-
-
- setOpen(false)}
- className="bg-[#1F6779] text-white rounded-full"
- >
- SEND INQUIRY
-
-
-
-
+
+
+ TEST DRIVE
+
+
+
+
+
+
+
+
+
+
+ BROSUR
+
+
+
+
+
+ TEST DRIVE
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {gradients.map((bg, index) => (
+ setSelectedColorIndex(index)}
+ whileHover={{ scale: 1.1 }}
+ whileTap={{ scale: 0.95 }}
+ className={`w-4 h-4 md:w-6 md:h-6 rounded-full border-2 ${
+ selectedColorIndex === index ? "border-black" : "border-white"
+ } shadow-md hover:cursor-pointer`}
+ style={{ background: bg }}
+ aria-label={`Pilih warna ${index + 1}`}
+ />
+ ))}
+
+
+ >
+ );
+}
diff --git a/public/j5-biru.png b/public/j5-biru.png
new file mode 100644
index 0000000..26f83f4
Binary files /dev/null and b/public/j5-biru.png differ
diff --git a/public/j5-ev-new.png b/public/j5-ev-new.png
new file mode 100644
index 0000000..9adb1c8
Binary files /dev/null and b/public/j5-ev-new.png differ
diff --git a/public/j5-hijau.png b/public/j5-hijau.png
new file mode 100644
index 0000000..e313b9d
Binary files /dev/null and b/public/j5-hijau.png differ
diff --git a/public/j5-hitam.png b/public/j5-hitam.png
new file mode 100644
index 0000000..ab37fea
Binary files /dev/null and b/public/j5-hitam.png differ
diff --git a/public/j5-new1.jpg b/public/j5-new1.jpg
new file mode 100644
index 0000000..91ac074
Binary files /dev/null and b/public/j5-new1.jpg differ
diff --git a/public/j5-putih.png b/public/j5-putih.png
new file mode 100644
index 0000000..c4225cb
Binary files /dev/null and b/public/j5-putih.png differ
diff --git a/public/j5-silver.png b/public/j5-silver.png
new file mode 100644
index 0000000..b6d2c8a
Binary files /dev/null and b/public/j5-silver.png differ
diff --git a/service/galery.ts b/service/galery.ts
index 200583f..581ab22 100644
--- a/service/galery.ts
+++ b/service/galery.ts
@@ -17,6 +17,11 @@ export async function getGaleryFileData(props: PaginationRequest) {
return await httpGetInterceptor(`/gallery-files`);
}
+// untuk list files
+export async function getAllGaleryFiles() {
+ return await httpGetInterceptor(`/gallery-files`);
+}
+
export async function getGaleryById(id: any) {
const headers = {
"content-type": "application/json",