text: import Helmet from 'react-helmet';
  import React from 'react';
  
  import userConfig from '../../config';
  
  import Layout from './layout';
  
  import Card from '../components/Card';
  import Container from '../components/Container';
  import Pagination from '../components/Pagination';
  import Summary from '../components/Summary';
  
  const IndexPage = ({ pageContext }) => {
    const { group, index, pageCount } = pageContext;
    const previousUrl = index - 1 === 1 ? '' : (index - 1).toString();
    const nextUrl = (index + 1).toString();
    return (
      <Layout>
        <Container>
          <Helmet
            title={`${userConfig.title} | ${userConfig.author}`}
            htmlAttributes={{ lang: 'ru' }}
          >
            <meta
              name="description"
              content={`${userConfig.title} | ${userConfig.description}`}
            />
          </Helmet>
          {group.map(({ node }) => (
            <Card key={node.fields.slug}>
              <Summary
                date={node.frontmatter.date}
                title={node.frontmatter.title}
                excerpt={node.excerpt}
                image={node.frontmatter.featuredImage}
                slug={node.fields.slug}
              />
            </Card>
          ))}
        </Container>
      </Layout>
    );
  };
  export default IndexPage;
  