import React from 'react'
import { Link, graphql } from 'gatsby'
import { Post } from '../@types/Post'
import Pagination from '../components/molecules/Pagination'
import Featured from '../components/molecules/Featured'
import PostTitle from '../components/organisms/Post/Title'
import PostLead from '../components/organisms/Post/Lead'
import PostContent from '../components/organisms/Post/Content'
import PostMore from '../components/organisms/Post/More'
import PostLinkActions from '../components/organisms/Post/LinkActions'
import SEO from '../components/atoms/SEO'
import styles from './Posts.module.scss'
import { Image } from '../components/atoms/Image'
export default function Posts({
data,
location,
pageContext
}: {
data: any
location: Location
pageContext: {
tag: string
slug: string
currentPageNumber: number
numPages: number
}
}) {
const edges = data.allMarkdownRemark.edges
const { tag, currentPageNumber, numPages } = pageContext
const PostsList = edges.map(({ node }: { node: Post }) => {
const { type, linkurl, title, image } = node.frontmatter
const { slug } = node.fields
return (