Skip to content

Commit

Permalink
Working Fine
Browse files Browse the repository at this point in the history
  • Loading branch information
prvslnk committed Sep 6, 2023
1 parent bc7099c commit 1865761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/FetchData.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const FetchData = ({ cat }) => {
const fetchdata = async () => {
await axios
.get(
cat ? `https://newsapi.org/v2/top-headlines?country=in&category=${cat}&apiKey=f463419c4e4c4ebd96549c95688e979b`
: "https://newsapi.org/v2/top-headlines?country=in&apiKey=29fd802688a44af78fadd562ca88adf7"
cat ? `https://saurav.tech/NewsAPI/top-headlines/category/${cat}/in.json`
: "https://saurav.tech/NewsAPI/top-headlines/category/general/in.json"
).then((res) => setData(res.data.articles));
};
useEffect(() => {
Expand Down

0 comments on commit 1865761

Please sign in to comment.