import React, { useState } from 'react'; import { JobFeedItem, PlatformType } from '../types'; import { Rss, Sparkles, ExternalLink, Building2, MapPin, DollarSign, Send, Filter, Search, CheckCircle2, Clock } from 'lucide-react'; interface JobFeedsProps { jobFeeds: JobFeedItem[]; onTailorJobFeed: (item: JobFeedItem) => void; onQuickApplyFeed: (item: JobFeedItem) => Promise; } export const JobFeeds: React.FC = ({ jobFeeds, onTailorJobFeed, onQuickApplyFeed }) => { const [searchTerm, setSearchTerm] = useState(''); const [selectedPlatform, setSelectedPlatform] = useState('ALL'); const [minMatch, setMinMatch] = useState(80); const [appliedFeedIds, setAppliedFeedIds] = useState([]); const filteredFeeds = jobFeeds.filter(feed => { const matchesSearch = feed.title.toLowerCase().includes(searchTerm.toLowerCase()) || feed.company.toLowerCase().includes(searchTerm.toLowerCase()) || feed.location.toLowerCase().includes(searchTerm.toLowerCase()); const matchesPlatform = selectedPlatform === 'ALL' || feed.platform === selectedPlatform; const matchesMatch = feed.estimatedMatch >= minMatch; return matchesSearch && matchesPlatform && matchesMatch; }); const handleApply = async (feed: JobFeedItem) => { setAppliedFeedIds(prev => [...prev, feed.id]); await onQuickApplyFeed(feed); }; return (
{/* Top Banner */}

Active Job Feeds & Scraped Postings

Aggregated real-time job openings from LinkedIn, Greenhouse, Lever, Workday, and Glassdoor with AI match scoring.

Total Feeds: {jobFeeds.length}
{/* Filter Bar */}
{/* Search */}
setSearchTerm(e.target.value)} className="w-full pl-10 pr-4 py-2 rounded-xl bg-slate-950 border border-slate-800 text-slate-200 text-xs placeholder:text-slate-500 focus:outline-none focus:border-indigo-500" />
{/* Platform & Match Threshold */}
Min Match: {minMatch}% setMinMatch(Number(e.target.value))} className="w-20 accent-indigo-500 cursor-pointer" />
{/* Feed Cards Grid */}
{filteredFeeds.length === 0 ? (
No active job feed listings match your criteria.
) : ( filteredFeeds.map((feed) => { const isApplied = appliedFeedIds.includes(feed.id); return (

{feed.title}

{feed.company} • {feed.platform}

{feed.estimatedMatch}% Match

{feed.description}

{feed.requiredSkills.map((sk, idx) => ( {sk} ))}
{feed.location} • {feed.postedDate}
); }) )}
); };