import React, { useState } from 'react';
import { Head, Link, router } from '@inertiajs/react';
import EmployerLayout from '../../Layouts/EmployerLayout';
import {
Bookmark,
CheckCircle2,
Globe2,
Briefcase,
DollarSign,
MessageSquare,
Trash2,
SlidersHorizontal
} from 'lucide-react';
export default function Shortlist({ shortlistedWorkers }) {
const [workers, setWorkers] = useState(shortlistedWorkers || []);
const removeWorker = (id) => {
// Optimistic UI state update
setWorkers(workers.filter(w => w.id !== id));
// Persist change to database
router.post(`/employer/shortlist/${id}/remove`, {}, {
preserveScroll: true
});
};
return (
You have {workers.length} candidates saved for review
Browse more workersExplore candidate profiles and click the bookmark icon to save them for later comparison.
Find Workers Now