From 4e4ade4a369fc7d1f2b685af6852509a7c7d0f94 Mon Sep 17 00:00:00 2001 From: ashiii1 Date: Sat, 19 Oct 2024 14:12:49 +0530 Subject: [PATCH 1/2] redirect to similar cards --- src/components/ExpandedCard.jsx | 56 +++++++++++++++++++++++++++++ src/components/PostCard.jsx | 6 ++-- src/components/RecentPosts.jsx | 63 +++++++++++++++++++++++++-------- src/pages/Home.jsx | 55 ++++++++++++++++++++-------- 4 files changed, 148 insertions(+), 32 deletions(-) create mode 100644 src/components/ExpandedCard.jsx diff --git a/src/components/ExpandedCard.jsx b/src/components/ExpandedCard.jsx new file mode 100644 index 0000000..a0b26ec --- /dev/null +++ b/src/components/ExpandedCard.jsx @@ -0,0 +1,56 @@ +import Footer from "./Footer"; + +const ExpandedCard = ({ post, similarPosts, onBack }) => { + return ( + <> +
+ {/* Back button in the top-left corner */} + + +
{/* Added margin-top to adjust spacing below the back button */} + {post.title} +

{post.title}

+

+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent + commodo cursus magna, vel scelerisque nisl consectetur et. +

+ +

Similar Posts

+
+ {similarPosts.map((similarPost) => ( +
+ {similarPost.title} +
+

{similarPost.title}

+
+
+ ))} +
+ +
+ +
+ +