Skip to content

Commit

Permalink
Merge branch 'blog-page-redesign' of github.com:SpaceyaTech/SYT-Web-R…
Browse files Browse the repository at this point in the history
…edesign into blog-page-redesign
  • Loading branch information
Ase020 committed Feb 29, 2024
2 parents 9eda1c5 + cb7c2b4 commit 2a1bbd3
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions src/APP/pages/blog/sections/RelatedBlogs.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
<<<<<<< HEAD

import { useEffect } from "react";
import { useParams } from "react-router-dom";
import { useRelatedBlogsData } from "../../../../hooks/Queries/blog/useBlogData";
import BlogCard from "../../blogs/sections/BlogCard";
import { filterRelatedBlogs } from "../../../../utilities/FilterBlogs";

function RelatedBlogs({ blogId, categoryId }) {
const { title_slug } = useParams();
=======
import { useEffect } from "react";
import { useParams } from "react-router-dom";

Expand All @@ -18,7 +7,6 @@ import RelatedBlogCard from "./RelatedBlogCard";

function RelatedBlogs({ blogId, categoryId }) {
const { titleSlug } = useParams();
>>>>>>> main

const {
data: relatedBlogsData,
Expand All @@ -30,19 +18,11 @@ function RelatedBlogs({ blogId, categoryId }) {

useEffect(() => {
refetchRelatedBlogsData();
<<<<<<< HEAD
}, [title_slug]);

const filteredRelatedBlogs = filterRelatedBlogs(
relatedBlogsData?.blogs,
title_slug
=======
}, [refetchRelatedBlogsData, titleSlug]);

const filteredRelatedBlogs = filterRelatedBlogs(
relatedBlogsData?.blogs,
titleSlug
>>>>>>> main
);

return (
Expand All @@ -67,11 +47,8 @@ function RelatedBlogs({ blogId, categoryId }) {
}
return true;
})
<<<<<<< HEAD
.map((blog) => <BlogCard key={blog.id} blog={blog} />)
=======

.map((blog) => <RelatedBlogCard key={blog.id} blog={blog} />)
>>>>>>> main
) : (
<p className="text-lg italic">No related blogs found!</p>
)}
Expand All @@ -82,8 +59,4 @@ function RelatedBlogs({ blogId, categoryId }) {
);
}

<<<<<<< HEAD
export default RelatedBlogs;
=======
export default RelatedBlogs;
>>>>>>> main

0 comments on commit 2a1bbd3

Please sign in to comment.