diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 2dd725f..92849eb 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -75,7 +75,9 @@ const Navbar = () => { exit={{ opacity: 0, y: -50 }} className="md:hidden absolute left-0 w-full flex flex-col items-center justify-center" > -
+ +
+ Home About us News 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 ( -
-
- news-image -
-
-

{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 ( +
+
+ + news-image + + + +
+
+

{title}

+
{`${source.name} • ${new Date( + publishedAt + ).toLocaleString()}`}
+

{description}

- ); - } + +
+ ); +} - export default NewsCard; \ No newline at end of file +export default NewsCard;