Files
lead-scraper/components/shared/ExportButtons.tsx
Timo Uttenweiler facf8c9f69 Initial commit: LeadFlow lead generation platform
Full-stack Next.js 16 app with three scraping pipelines:
- AirScale CSV → Anymailfinder Bulk Decision Maker search
- LinkedIn Sales Navigator → Vayne → Anymailfinder email enrichment
- Apify Google SERP → domain extraction → Anymailfinder bulk enrichment

Includes Docker multi-stage build + docker-compose for Coolify deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 11:21:11 +01:00

39 lines
1.3 KiB
TypeScript

"use client";
import { Button } from "@/components/ui/button";
import { Download, FileSpreadsheet } from "lucide-react";
import { exportToCSV, exportToExcel, type ExportRow } from "@/lib/utils/csv";
interface ExportButtonsProps {
rows: ExportRow[];
filename: string;
disabled?: boolean;
summary?: string;
}
export function ExportButtons({ rows, filename, disabled, summary }: ExportButtonsProps) {
return (
<div className="flex items-center gap-3 flex-wrap">
{summary && <span className="text-sm text-gray-400">{summary}</span>}
<Button
variant="outline"
size="sm"
disabled={disabled || rows.length === 0}
onClick={() => exportToCSV(rows, `${filename}.csv`)}
className="border-[#2e2e3e] hover:border-blue-500/50 hover:bg-blue-500/5 text-gray-300"
>
<Download className="w-4 h-4 mr-1.5" /> Download CSV
</Button>
<Button
variant="outline"
size="sm"
disabled={disabled || rows.length === 0}
onClick={() => exportToExcel(rows, `${filename}.xlsx`)}
className="border-[#2e2e3e] hover:border-purple-500/50 hover:bg-purple-500/5 text-gray-300"
>
<FileSpreadsheet className="w-4 h-4 mr-1.5" /> Download Excel
</Button>
</div>
);
}