Route
- Path:
/ - Component:
HomePage - File:
source/src/pages/Home.jsx
Purpose
The home page serves as the landing page for DevJobs, welcoming users and providing:- Quick search access to job listings
- Platform value proposition and benefits
- Call-to-action to start job searching
Key Features
1. Hero Section with Search
The hero section includes:- Hero Image: Background visual (
background.webp) - Headline: “Encuentra el trabajo de tus sueños”
- Tagline: Platform description
- Search Form: Direct search input with submit button
2. Benefits Section
Three key benefits highlighting:- Find Dream Jobs: Search thousands of jobs from top companies
- Connect with Companies: Match with companies hiring for your skills
- Earn What You Deserve: Salary calculator information
Components Used
The home page is self-contained and doesn’t use external components. It includes:- Form: Search form with text input and submit button
- SVG Icons: Inline SVG for search icon and benefit icons
- Semantic HTML: Uses
<main>,<section>,<article>for structure
Hooks and State Management
useRouter Hook
The page uses a customuseRouter hook for navigation:
Search Handler
Handles form submission and navigation:- Prevents default form submission
- Extracts search text from form data
- Constructs URL with query parameter (if search text exists)
- Navigates to search page with or without query string
User Flows
Search Flow
- User enters search query in the hero search input
- User clicks “Buscar” button or presses Enter
- Form submission is intercepted by
handleSearch - Search text is extracted from form data
- User is navigated to
/search?text={query}
Navigation Flow
- Direct Search: Enter query → Navigate to Search page with filters
- Browse All: Leave search empty → Navigate to Search page (all jobs)
Code Example
Complete Search Form Implementation
Marketing Section
Structure
Integration Points
Navigation
- To Search Page: Via form submission with
useRouterhook - Query Parameters: Passes
?text={searchText}to search page
Routing
The home page is mounted at the root route (/) in the application’s router configuration.
Styling
The home page uses inline styles and semantic HTML without a dedicated CSS module, relying on global styles for consistent appearance.Accessibility
- Form Role:
role="search"for semantic search form - Required Input: Search input marked as required
- Icon Accessibility: SVG icons use
aria-hidden="true"since they’re decorative - Semantic Structure: Proper use of headings, sections, and articles
Related Pages
- Search Page - Destination after search submission
- Detail Page - Accessed from search results