A React application that fetches and displays news articles from an API based on selected categories and countries. It includes features like category filtering, pagination, and detailed article views.
![Screenshot 2024-06-21 180242](https://private-user-images.githubusercontent.com/123949154/341763003-52c84da5-c9e6-4c6e-a62e-19238a3bfcba.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5MTk0NDAsIm5iZiI6MTcxOTkxOTE0MCwicGF0aCI6Ii8xMjM5NDkxNTQvMzQxNzYzMDAzLTUyYzg0ZGE1LWM5ZTYtNGM2ZS1hNjJlLTE5MjM4YTNiZmNiYS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwMlQxMTE5MDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hM2JlZGNjNjExOWY2ODM5ZTRkMzNmN2NhMzVkNmUwOTBkMjVlNWRhMjNiN2Q4N2Q0YzVmMTFmYmU4MjJhNTcxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.NhE-jSlwiWdR96eIPfCBIzNLbwPOZRnfL6OgtxRf5kI)
You can view a live demo of the project [here](#).
-
Category Filtering: Allows users to filter news articles by Business, Technology, Entertainment, Health, Science, and Sports categories.
-
Pagination: Implements pagination to navigate through multiple pages of articles.
-
Article Details: Clicking on an article card displays detailed information including the title, image (if available), content, author, publication date, and a link to the full article.
-
Responsive Design: Ensures the application is usable and looks good across various devices and screen sizes.
- React: Frontend framework for building user interfaces.
- Redux: State management library for managing application state.
- React Router: Library for handling navigation and routing in React applications.
- Styled Components: Library for styling React components using tagged template literals.
- News API: Used for fetching news article data.
-
Clone the repository:
git clone https://github.com/Anshuldhakate/news-portal.git cd news-portal
-
Install dependencies: npm install
-
Set up your environment variables: REACT_APP_NEWS_API_KEY=0ea5e0b2d8fd4b1ea376ce92a4814427
-
Start the development server: npm start
- Select a category from the filter to view articles related to that category.
- Use pagination to navigate through multiple pages of articles.
- Click on an article card to view detailed information including the article's title, image, content, author, publication date, and a link to the full article.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature/improvement).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature/improvement).
- Create a new Pull Request.