This is a simple car search website built using ReactJS for desktop-only screens.
- Search for cars by name.
- Paginate through the list of cars.
- Display car cards in rows of 3, with a maximum of 6 cards per page.
- Fully functional pagination with next, previous, and page number buttons.
- 10 pages are displayed in the pagination, hardcoded.
- Uses mock data from a JSON file (API integration not required).
- Clone this repository.
- Navigate to the project directory.
- Run
npm install
to install dependencies. - Run
npm start
to start the development server.
src/components
: Contains React components.src/data/cars.json
: JSON file with car data.src/App.js
: Routing and component rendering.public
: Public assets and HTML template.
car-rental-portal/
├── src/
│ ├── components/
│ │ ├── CarCard.js
│ │ ├── Cars.js
│ │ ├── Footer.js
│ │ └── Header.js
│ ├── data/
│ │ └── cars.json
│ ├── App.js
│ ├── index.js
│ ├── App.css
│ └── ...
├── public/
│ ├── index.html
│ └── ...
├── package.json
├── tailwind.config.js
├── README.md
└── ...
- Upon starting the development server, open the website in your browser.
- Use the search bar to search for cars by name.
- Use the pagination to navigate through the list of cars.