Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/components/BlogPage/BlogContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import React from "react"
import { useBlog } from "../../hooks"
import BlogGrid from "./BlogGrid/BlogGrid"
import BlogArticle from "./BlogArticle/BlogArticle"

import Seo from "../Seo/Seo"
import "./BlogContainer.scss"
import Layout from "../layout"
import Banner from "../Banner/Banner"

const Blog = () => {

Expand All @@ -12,9 +14,16 @@ const Blog = () => {
const dataArticles = blogData?.allStrapiArticle?.nodes
const defaultCategory = data[0]?.name
const filterArticle = data.map(category => dataArticles.filter(article => category.name === article?.blog_category?.name || defaultCategory))
const { seo, banner } = blogData.allStrapiBlogPage.nodes[0]

return (
<>
<Layout>
<Seo
title={seo.pageTitle}
description={seo.pageDescription}
keywords={seo.pageKeywords}
/>
<Banner data={banner} />
{data.length > 0 && (
<div className="blog__container container">
{filterArticle?.map((category, idx) => (
Expand All @@ -33,7 +42,7 @@ const Blog = () => {
))}
</div>
)}
</>
</Layout>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/BlogPage/BlogGrid/BlogGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const BlogGrid = ({ title, children }) => {
<div className="grid__container">
<h4>{title}</h4>
{/* <div className="grid__content">{children}</div> */}
<Pagination initialState={true} postPerPage="3" posts={children} />
<Pagination initialState={true} postPerPage="9" posts={children} />
</div>
)
}
Expand Down