diff --git a/src/components/Feed/Feed.jsx b/src/components/Feed/Feed.jsx index 284f11d..80d119d 100755 --- a/src/components/Feed/Feed.jsx +++ b/src/components/Feed/Feed.jsx @@ -1,6 +1,5 @@ import React, { useState, useEffect } from 'react'; import { navigate } from "@reach/router"; -import { StaticQuery, graphql } from 'gatsby'; import queryString from 'query-string'; //import Img from 'gatsby-image'; import Link from "components/_ui/Link/Link"; @@ -11,8 +10,8 @@ import cardImg from './card-img.png'; let windowGlobal = typeof window !== 'undefined' && window; let parsedParams = windowGlobal.location ? queryString.parse(windowGlobal.location.search) : {}; -//let feedSections = ["work & writing", "about", "contact"] -//let workSections = ["data viz", "web development", "tutorial", "beginner", "other"] +let feedSections = ["work & writing", "about", "contact"] +let workSections = ["data viz", "web development", "tutorial", "beginner", "other"] const Feed = () => { const [feedQuery, setFeedQuery] = useState(parsedParams || ''); @@ -51,17 +50,11 @@ const Feed = () => { }, [feedQuery]); return ( - { - console.log(data) - - return ( -
-
- {/* {feedSections.map((section, i) => ( -
-
+
+
+ {feedSections.map((section, i) => ( +
+ {/*
{section}
@@ -79,13 +72,13 @@ const Feed = () => { ))}
- )} + )} */} -
- ))} */} -
-
- {/* {content.map((item, i) => ( +
+ ))} +
+
+ {/* {content.map((item, i) => (
@@ -107,27 +100,24 @@ const Feed = () => { ))} */} - -
-
- Movies Consumed -
-
- Data Viz -
-
-
- -
-
- https://github.com/margueriteroth/stu/tree/master/python -
- + +
+
+ Movies Consumed
+
+ Data Viz +
+
+
+ +
+
+ https://github.com/margueriteroth/stu/tree/master/python
- ); - }} - /> + +
+
); }; @@ -135,24 +125,4 @@ Feed.propTypes = { }; -export default Feed; - - -const FEED_QUERY = graphql` - query { - allMdx(filter: {fileAbsolutePath: {regex: "/blog/"}}, sort: {fields: frontmatter___date, order: DESC}) { - edges { - node { - id - fields { - slug - } - frontmatter { - title - date(formatString: "MMMM D, YYYY") - } - } - } - } - } -`; \ No newline at end of file +export default Feed; \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index c51239f..1c8c0e7 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,4 +1,5 @@ -import React from "react"; +import React from "react" +import { StaticQuery, graphql } from "gatsby" import Feed from "components/Feed/Feed" import Layout from "components/Layout/Layout" import MaxWidth from "components/_ui/MaxWidth/MaxWidth" @@ -6,14 +7,42 @@ import MoviesContainer from "components/Movies/MoviesContainer" import "./index.scss" const HomePage = () => ( - - -
- Hello! I'm Marguerite — a designer and software engineer. -
- -
-
+ ( + + +
+ Hello! I'm Marguerite — a designer and software + engineer. +
+ +
+
+ )} + /> ) -export default HomePage; \ No newline at end of file +export default HomePage + +const FEED_QUERY = graphql` + query { + allMdx( + filter: { fileAbsolutePath: { regex: "/blog/" } } + sort: { fields: frontmatter___date, order: DESC } + ) { + edges { + node { + id + fields { + slug + } + frontmatter { + title + date(formatString: "MMMM D, YYYY") + } + } + } + } + } +`