import { Card, CardContent, CardHeader, CardTitle } from "@workspace/ui/components/card" import { Button } from "@workspace/ui/components/button" import { Badge } from "@workspace/ui/components/badge" import { Input } from "@workspace/ui/components/input" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@workspace/ui/components/select" import { Building2, MapPin, DollarSign, Calendar, Clock, Search, Filter, Bookmark, Share2, Eye, ArrowRight, Briefcase, Users, Star, CheckCircle, ExternalLink } from "lucide-react" import { db, jobs, companies } from "@workspace/db" import { eq } from "drizzle-orm" import JobApplicationModal from "../../components/job-application-modal" async function getJobsData() { try { const availableJobs = await db.query.jobs.findMany({ where: eq(jobs.active, true), with: { company: true } }); return availableJobs; } catch (error) { console.error("Error fetching jobs:", error); return []; } } export default async function JobsPage() { const jobs = await getJobsData(); // Mock data for demonstration const mockJobs = [ { id: 1, title: "Software Engineer Intern", company: { name: "TechCorp Solutions", email: "careers@techcorp.com" }, location: "San Francisco, CA", salary: "$25/hour", description: "Join our dynamic team and work on cutting-edge projects. We're looking for passionate developers who love to learn and grow.", applicationDeadline: new Date("2024-02-15"), minCGPA: 7.5, active: true, link: "https://techcorp.com/careers" }, { id: 2, title: "Data Analyst", company: { name: "DataFlow Inc", email: "hr@dataflow.com" }, location: "New York, NY", salary: "$30/hour", description: "Analyze large datasets and provide insights to drive business decisions. Experience with Python and SQL required.", applicationDeadline: new Date("2024-02-10"), minCGPA: 7.0, active: true, link: "https://dataflow.com/jobs" }, { id: 3, title: "Frontend Developer", company: { name: "WebSolutions", email: "jobs@websolutions.com" }, location: "Remote", salary: "$28/hour", description: "Build beautiful and responsive user interfaces. Strong knowledge of React, TypeScript, and modern CSS required.", applicationDeadline: new Date("2024-02-05"), minCGPA: 7.2, active: true, link: "https://websolutions.com/careers" }, { id: 4, title: "Product Manager Intern", company: { name: "InnovateTech", email: "careers@innovatetech.com" }, location: "Seattle, WA", salary: "$32/hour", description: "Work closely with cross-functional teams to define product requirements and drive product development.", applicationDeadline: new Date("2024-02-01"), minCGPA: 7.8, active: true, link: "https://innovatetech.com/jobs" }, { id: 5, title: "DevOps Engineer", company: { name: "CloudTech Systems", email: "hr@cloudtech.com" }, location: "Austin, TX", salary: "$35/hour", description: "Manage cloud infrastructure and deployment pipelines. Experience with AWS, Docker, and Kubernetes preferred.", applicationDeadline: new Date("2024-02-20"), minCGPA: 7.0, active: true, link: "https://cloudtech.com/careers" }, { id: 6, title: "UX/UI Designer", company: { name: "DesignStudio", email: "jobs@designstudio.com" }, location: "Los Angeles, CA", salary: "$26/hour", description: "Create intuitive and beautiful user experiences. Proficiency in Figma, Adobe Creative Suite, and user research methods.", applicationDeadline: new Date("2024-02-12"), minCGPA: 7.5, active: true, link: "https://designstudio.com/jobs" } ]; const allJobs = [...jobs, ...mockJobs]; return (
Find the perfect opportunity that matches your skills and aspirations
Total Jobs
{allJobs.length}
Active Companies
{new Set(allJobs.map(job => job.company.name)).size}
Remote Jobs
{allJobs.filter(job => job.location.toLowerCase().includes('remote')).length}
Avg Salary
$28/hr
{job.company.name}
{job.description}
Try adjusting your search criteria or check back later for new opportunities