Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Fixing PostsList page from not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cnocon committed Mar 20, 2021
1 parent 38e1e76 commit ec81f8b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
10 changes: 5 additions & 5 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const siteUrl = isNetlifyProduction ? NETLIFY_SITE_URL : NETLIFY_DEPLOY_URL;
module.exports = {
siteMetadata: {
siteUrl: siteUrl,
title: `Cristin O'Connor | Front End Developer`,
title: `Cristin O'Connor | Front End Software Engineer`,
author: `Cristin O'Connor`,
jobTitle: `Front End Developer`,
description: `Professional Front End Development Blog and CV Site`,
jobTitle: `Front End Software Engineer`,
description: `Front End Engineer Cristin O'Connor's Portfolio, Blog, and CV Site`,
twitter: `@cnocon`,
},
plugins: [
Expand Down Expand Up @@ -78,8 +78,8 @@ module.exports = {
resolveEnv: () => process.env.NETLIFY_ENV,
env: {
production: {
policy: [{
userAgent: '*',
policy: [{
userAgent: '*',
allow: ['/', '/static/']
}]
},
Expand Down
8 changes: 4 additions & 4 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ const Header = ({ ruleTitle, ruleIcon, showLogo=true }) => {
<Sty.ImageEl src={portrait} alt="Cristin O'Connor Avatar" className={`top-bar ${showLogo ? '' : 'hidden'}`}/>
<Sty.Heading1>
<Sty.H1Link to="/">Cristin O'Connor</Sty.H1Link>
<Sty.Subhead>Front End Developer</Sty.Subhead>
<Sty.Subhead>Front End Software Engineer</Sty.Subhead>
</Sty.Heading1>
</div>

<Sty.Nav>
<Sty.NavItem>
<Sty.NavLink to="/" activeClassName="active">About</Sty.NavLink>
</Sty.NavItem>
<Sty.NavItem>
<Sty.NavLink to="/articles/page-1" className={`${articlesClass}`}>Blog</Sty.NavLink>
</Sty.NavItem>

<Sty.NavItem>
<Sty.NavLink to="/portfolio" className={`${portfolioClass}`}>Portfolio</Sty.NavLink>
</Sty.NavItem>
<Sty.NavItem>
<Sty.NavLink to="/resume" className={`${resumeClass}`}>Résumé</Sty.NavLink>
</Sty.NavItem>

</Sty.Nav>
</div>
</Sty.Container>
Expand Down
15 changes: 10 additions & 5 deletions src/components/PostsList/PostsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ const PostsList = ({ data, pageContext }) => {
const currentPageNumber = Math.floor(identifier / 3) + 1;
const prevPageNumber = currentPageNumber - 1 > 0 ? currentPageNumber - 1 : false;
const nextPageNumber = currentPageNumber + 1 <= maxPageNumber ? currentPageNumber + 1 : false;
const categories = Object.values(data.categories.nodes.map(node => node.categories).flat().reduce((acc, node) => {
if (!acc[node.slug]) {
acc[node.slug] = { name: node.name, slug: node.slug };

const categories = data ? Object.values(data?.categories?.nodes.map(node => node.categories).flat().reduce((acc, node) => {
if (node) {
if (!acc[node.slug]) {
acc[node.slug] = { name: node.name, slug: node.slug };
}
return acc;
} else {
return null;
}
return acc;
}, {}));
}, {})) : [];

const prevBtn = (
<div className="col-sm-6 nav-prev left-block">
Expand Down
2 changes: 1 addition & 1 deletion src/components/SEO/seo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Helmet } from "react-helmet"
import imageGetter from '../utils/imageGetter';

function SEO({ sdescription, lang, meta, stitle, slug='', children }) {
const metaDescription = sdescription || `Professional blog and CV site for Front End Developer Cristin O'Connor`;
const metaDescription = sdescription || `Front End Engineer Cristin O'Connor's portfolio, blog and CV site`;
const image = `https://cristin.io${imageGetter(slug)}`;
const title = stitle || `CRISTIN.IO`;

Expand Down
2 changes: 1 addition & 1 deletion src/data/ResumeData.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ResumeData = {
name: "Cristin O'Connor",
jobTitle: "Front End Developer",
jobTitle: "Front End Software Engineer",
experience: [
// {
// startDate: "June 2019",
Expand Down

0 comments on commit ec81f8b

Please sign in to comment.