Remove comments

This commit is contained in:
2026-03-06 13:41:09 +08:00
parent e125321cae
commit 52f2d702d4
4 changed files with 46 additions and 7 deletions

View File

@@ -3,7 +3,6 @@
import { LeadCard } from './components/LeadCard';
import { useState, useEffect } from 'react';
// Define the shape of your lead for better type safety
interface Lead {
id: string;
name: string;
@@ -17,11 +16,9 @@ export default function Home() {
useEffect(() => {
const fetchLeads = async () => {
try {
// Use the environment variable or hardcoded backend URL
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000'}/leads`);
const data = await res.json();
// Assuming your NestJS/Python returns { leads: [...] }
setLeads(data.leads);
} catch (error) {
console.error("Failed to fetch leads:", error);