From b696f1455486a6fa09c1c272ee2fd3a60e394d76 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Fri, 10 Apr 2026 14:57:19 +0800 Subject: [PATCH] fix error --- components/form/agent/agent-form.tsx | 1 - components/landing-page/agent.tsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/form/agent/agent-form.tsx b/components/form/agent/agent-form.tsx index 19b415d..cd1f10c 100644 --- a/components/form/agent/agent-form.tsx +++ b/components/form/agent/agent-form.tsx @@ -32,7 +32,6 @@ type AgentFormValues = { const agentTypes = ["After Sales", "Sales", "Spv", "Branch Manager"]; export default function AddAgentForm() { - // const [previewImg, setPreviewImg] = useState(null); const router = useRouter(); const [file, setFile] = useState(null); const [previewImg, setPreview] = useState(null); diff --git a/components/landing-page/agent.tsx b/components/landing-page/agent.tsx index c3d8354..66bcbce 100644 --- a/components/landing-page/agent.tsx +++ b/components/landing-page/agent.tsx @@ -36,8 +36,8 @@ export default function Agent() { (a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime(), - ) // ✅ newest first - .slice(0, 3); // ✅ max 5 + ) + .slice(0, 3); setAgents(latestApprovedAgents); } catch (error) {