{"size": 1154, "ext": "js", "max_stars_repo_path": "src/templates/users/authors.js", "max_stars_repo_name": "rajansiingh/CareerSelect", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/templates/users/authors.js", "max_issues_repo_name": "rajansiingh/CareerSelect", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/templates/users/authors.js", "max_forks_repo_name": "rajansiingh/CareerSelect", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.0555555556, "max_line_length": 120, "alphanum_fraction": 0.5944540728}
import React from 'react';
import Layout from '../../components/common/Layout';
import Listing from '../../components/common/Listing/Listing';
import Pagination from '../../components/Pagination';
import SEO from '../../components/SEO/SEO';
import {authorURI} from '../../../globals';

const Blog = ({ pageContext }) => {
  const { nodes, pageNumber, hasNextPage, itemsPerPage, allPosts } = pageContext;
  const blogPagePath = hasNextPage
    ? `${authorURI}/`
    : `${authorURI}/page/${pageNumber + 1}`;
  const seo = {
    title: 'Author Page',
    description: 'Authors posts',
    canonical: blogPagePath,
    opengraphUrl:  blogPagePath,
    opengraphType: 'website'
  };
  return (
    <Layout>
      <SEO seo={seo}/>
      <div className='listing-page row'>{nodes && nodes.map(post => <Listing key={post.postId} data={post}
                                                                             type={['withAuthor', 'withDesc']}/>)}</div>
      <Pagination
        pageNumber={pageNumber}
        hasNextPage={hasNextPage}
        allPosts={allPosts}
        itemsPerPage={itemsPerPage}
      />
    </Layout>
  );
};

export default Blog;
