From 16d40df65def2a3feff906eda58f1825a0c5b606 Mon Sep 17 00:00:00 2001
From: "[Aniket Bhosale]" <[adbhosale2707]>
Date: Thu, 6 Jun 2024 16:54:53 +0530
Subject: [PATCH 1/2] Default news card image added
---
src/components/NewsCard.jsx | 51 +++++++++++++++++++++++++------------
1 file changed, 35 insertions(+), 16 deletions(-)
diff --git a/src/components/NewsCard.jsx b/src/components/NewsCard.jsx
index 2328ad1..df92e36 100644
--- a/src/components/NewsCard.jsx
+++ b/src/components/NewsCard.jsx
@@ -1,21 +1,40 @@
import React from "react";
function NewsCard({ article }) {
- const { title, description, source, publishedAt, url, image } = article;
-
- return (
-
-
-

-
-
-
{title}
-
{`${source.name} • ${new Date(publishedAt).toLocaleString()}`}
-
{description}
-
-
+ const { title, description, source, publishedAt, url, image } = article;
+ console.log(image)
+
+ const defaultImage =
+ "https://images.7news.com.au/publication/C-14905251/b0baa6a78bc17d1185f03003c8f7989917db9b9f-16x9-x0y75w800h450.jpg?imwidth=1200";
+
+ return (
+
+
+
+

+
+
+
+
+
+
{title}
+
{`${source.name} • ${new Date(
+ publishedAt
+ ).toLocaleString()}`}
+
{description}
- );
- }
+
+
+ );
+}
- export default NewsCard;
\ No newline at end of file
+export default NewsCard;
From b38f91633b42d00b7b93bce2fd2663807ffcafea Mon Sep 17 00:00:00 2001
From: "[Aniket Bhosale]" <[adbhosale2707]>
Date: Thu, 6 Jun 2024 22:12:01 +0530
Subject: [PATCH 2/2] extra gap resolved
---
src/components/Navbar.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx
index 5b20a5b..5ded626 100644
--- a/src/components/Navbar.jsx
+++ b/src/components/Navbar.jsx
@@ -65,7 +65,7 @@ const Navbar = () => {
exit={{ opacity: 0, y: -50 }}
className="md:hidden absolute left-0 w-full flex flex-col items-center justify-center"
>
-