From 44a13a952f8380d7971311ca425898a6ff8e798d Mon Sep 17 00:00:00 2001 From: bender Date: Sun, 8 Mar 2026 22:24:34 +0000 Subject: [PATCH] Update src/app/search/page.tsx --- src/app/search/page.tsx | 347 ++++++++++++++++++++++++++++++++++------ 1 file changed, 298 insertions(+), 49 deletions(-) diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index 9d80e98..2946dec 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -1,39 +1,119 @@ "use client"; +import { useState, useMemo } from "react"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; import FooterBase from "@/components/sections/footer/FooterBase"; -import { useState } from "react"; +import { Search, MapPin, DollarSign, Briefcase, X, ChevronLeft, ChevronRight } from "lucide-react"; const navItems = [ - { name: "Dashboard", id: "/" }, - { name: "Browse Jobs", id: "/search" }, - { name: "My Applications", id: "/applications" }, - { name: "Settings", id: "#settings" }, + { name: "Search Jobs", id: "search" }, + { name: "Post a Job", id: "post-job" }, + { name: "Admin", id: "admin-login" }, + { name: "Browse", id: "browse" }, + { name: "Contact", id: "contact" }, ]; const footerColumns = [ { title: "Product", items: [ - { label: "Browse Jobs", href: "/search" }, - { label: "Companies", href: "#" }, + { label: "Search Jobs", href: "/search" }, + { label: "Post a Job", href: "/post-job" }, + { label: "Browse by Province", href: "#provinces" }, { label: "For Employers", href: "#" }, ], }, { title: "Company", items: [ - { label: "About", href: "#" }, + { label: "About Jobee", href: "#about" }, + { label: "Careers", href: "#" }, + { label: "Contact Us", href: "#contact" }, { label: "Blog", href: "#" }, - { label: "Contact", href: "#" }, + ], + }, + { + title: "Resources", items: [ + { label: "Privacy Policy", href: "#" }, + { label: "Terms of Service", href: "#" }, + { label: "FAQ", href: "#" }, + { label: "Support", href: "#" }, ], }, ]; +interface Job { + id: string; + title: string; + company: string; + location: string; + salary: string; + jobType: string; + category: string; + description: string; + postedDate: string; +} + +const allJobs: Job[] = [ + { + id: "1", title: "Senior Software Engineer", company: "TechCorp Amsterdam", location: "Amsterdam, North Holland", salary: "€80,000 - €120,000", jobType: "Full-time", category: "Technology", description: "We're looking for an experienced software engineer to join our growing team.", postedDate: "2 days ago"}, + { + id: "2", title: "UX/UI Designer", company: "DesignStudio Rotterdam", location: "Rotterdam, South Holland", salary: "€50,000 - €75,000", jobType: "Full-time", category: "Design", description: "Join our creative team to design beautiful user experiences for web and mobile.", postedDate: "1 day ago"}, + { + id: "3", title: "Data Scientist", company: "DataFlow Utrecht", location: "Utrecht, Utrecht", salary: "€70,000 - €110,000", jobType: "Full-time", category: "Data & Analytics", description: "Help us build predictive models and analyze large datasets to drive business insights.", postedDate: "3 days ago"}, + { + id: "4", title: "Product Manager", company: "InnovateCo The Hague", location: "The Hague, South Holland", salary: "€60,000 - €95,000", jobType: "Full-time", category: "Product", description: "Lead product strategy and development for our flagship platform.", postedDate: "5 days ago"}, + { + id: "5", title: "Marketing Manager", company: "BrandBoost Groningen", location: "Groningen, Groningen", salary: "€45,000 - €70,000", jobType: "Full-time", category: "Marketing", description: "Develop and execute marketing strategies to grow our brand presence.", postedDate: "1 week ago"}, + { + id: "6", title: "Backend Developer", company: "CodeLabs Eindhoven", location: "Eindhoven, North Brabant", salary: "€65,000 - €100,000", jobType: "Full-time", category: "Technology", description: "Build scalable backend systems for millions of users worldwide.", postedDate: "3 days ago"}, + { + id: "7", title: "HR Specialist", company: "PeopleFirst Maastricht", location: "Maastricht, Limburg", salary: "€40,000 - €60,000", jobType: "Full-time", category: "Human Resources", description: "Support our HR team in recruiting and developing top talent.", postedDate: "4 days ago"}, + { + id: "8", title: "Sales Executive", company: "SalesForce Arnhem", location: "Arnhem, Gelderland", salary: "€35,000 - €55,000", jobType: "Full-time", category: "Sales", description: "Generate leads and close deals for our innovative B2B solutions.", postedDate: "2 days ago"}, + { + id: "9", title: "DevOps Engineer", company: "CloudNine Amsterdam", location: "Amsterdam, North Holland", salary: "€75,000 - €115,000", jobType: "Full-time", category: "Technology", description: "Manage cloud infrastructure and CI/CD pipelines for our platform.", postedDate: "1 day ago"}, + { + id: "10", title: "Content Writer", company: "ContentHub Haarlem", location: "Haarlem, North Holland", salary: "€35,000 - €50,000", jobType: "Part-time", category: "Content", description: "Create engaging content for our blog and social media channels.", postedDate: "2 days ago"}, + { + id: "11", title: "Financial Analyst", company: "FinanceCore Amsterdam", location: "Amsterdam, North Holland", salary: "€55,000 - €85,000", jobType: "Full-time", category: "Finance", description: "Analyze financial data and provide insights for strategic decision-making.", postedDate: "6 days ago"}, + { + id: "12", title: "Frontend Developer", company: "WebStudio Rotterdam", location: "Rotterdam, South Holland", salary: "€60,000 - €95,000", jobType: "Full-time", category: "Technology", description: "Build beautiful, responsive web applications using modern technologies.", postedDate: "5 days ago"}, +]; + +const JOBS_PER_PAGE = 6; + export default function SearchPage() { const [searchQuery, setSearchQuery] = useState(""); + const [selectedCategory, setSelectedCategory] = useState(null); + const [selectedJobType, setSelectedJobType] = useState(null); + const [selectedLocation, setSelectedLocation] = useState(null); + const [currentPage, setCurrentPage] = useState(1); - const handleSearch = (callback: () => void) => { - callback(); + const categories = ["Technology", "Design", "Data & Analytics", "Product", "Marketing", "Finance", "Sales", "Content", "Human Resources"]; + const jobTypes = ["Full-time", "Part-time", "Contract", "Remote"]; + const locations = [ + "Amsterdam, North Holland", "Rotterdam, South Holland", "Utrecht, Utrecht", "The Hague, South Holland", "Groningen, Groningen", "Eindhoven, North Brabant", "Maastricht, Limburg", "Arnhem, Gelderland", "Haarlem, North Holland"]; + + const filteredJobs = useMemo(() => { + return allJobs.filter((job) => { + const matchesSearch = searchQuery === "" || job.title.toLowerCase().includes(searchQuery.toLowerCase()) || job.company.toLowerCase().includes(searchQuery.toLowerCase()); + const matchesCategory = selectedCategory === null || job.category === selectedCategory; + const matchesJobType = selectedJobType === null || job.jobType === selectedJobType; + const matchesLocation = selectedLocation === null || job.location === selectedLocation; + + return matchesSearch && matchesCategory && matchesJobType && matchesLocation; + }); + }, [searchQuery, selectedCategory, selectedJobType, selectedLocation]); + + const totalPages = Math.ceil(filteredJobs.length / JOBS_PER_PAGE); + const paginatedJobs = filteredJobs.slice((currentPage - 1) * JOBS_PER_PAGE, currentPage * JOBS_PER_PAGE); + + const handleClearFilters = () => { + setSearchQuery(""); + setSelectedCategory(null); + setSelectedJobType(null); + setSelectedLocation(null); + setCurrentPage(1); }; return ( @@ -41,62 +121,231 @@ export default function SearchPage() { defaultButtonVariant="text-stagger" defaultTextAnimation="reveal-blur" borderRadius="pill" - contentWidth="medium" - sizing="medium" + contentWidth="smallMedium" + sizing="mediumLargeSizeLargeTitles" background="circleGradient" - cardStyle="glass-elevated" - primaryButtonStyle="gradient" + cardStyle="gradient-radial" + primaryButtonStyle="double-inset" secondaryButtonStyle="glass" - headingFontWeight="normal" + headingFontWeight="bold" > -