Skip to content

Commit b49947a

Browse files
author
Hassan Jamil
committed
removed recent/rest blog posts
1 parent 07987e8 commit b49947a

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/components/Blogs/Blogs.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,12 @@ const Blogs: React.FC = () => {
7777
posts.posts.sort((a:Posts,b:Posts) => {
7878
return new Date(b.date).valueOf() - new Date(a.date).valueOf();
7979
});
80-
let rest: any[] = []
81-
let recent: any[] = []
82-
if (window.screen.width > 760){
83-
recent = posts.posts.length > 2 ? posts.posts.slice(0,2) : posts.posts
84-
rest = posts.posts.length > 2 ? posts.posts.slice(2,) : []
85-
} else {
86-
rest = posts.posts
87-
}
8880

8981
return (
9082
<BlogPage>
9183
<RecentPostsWrapper>
9284
{
93-
recent.map((post) => (
85+
posts.posts.map((post) => (
9486
post.visibility !== "Hidden" &&
9587
<RecentPostDiv>
9688
<RecentImageDiv>
@@ -110,16 +102,6 @@ const Blogs: React.FC = () => {
110102
</RecentPostDiv>
111103
))}
112104
</RecentPostsWrapper>
113-
114-
<div className="Block-BlogPosts">
115-
<div className="PostsBlock-Blog">
116-
{
117-
rest.map(d => (
118-
<BlogPost post={d} />
119-
))
120-
}
121-
</div>
122-
</div>
123105
</BlogPage>
124106
)
125107
}

0 commit comments

Comments
 (0)