-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marguerite Roth
committed
Aug 15, 2021
1 parent
741fc1b
commit 25615cc
Showing
2 changed files
with
69 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
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" | ||
import MoviesContainer from "components/Movies/MoviesContainer" | ||
import "./index.scss" | ||
|
||
const HomePage = () => ( | ||
<Layout> | ||
<MaxWidth size="l" className="Home"> | ||
<div className="Home__greeting"> | ||
Hello! I'm Marguerite — a designer and software engineer. | ||
</div> | ||
<Feed /> | ||
</MaxWidth> | ||
</Layout> | ||
<StaticQuery | ||
query={FEED_QUERY} | ||
render={data => ( | ||
<Layout> | ||
<MaxWidth size="l" className="Home"> | ||
<div className="Home__greeting"> | ||
Hello! I'm Marguerite — a designer and software | ||
engineer. | ||
</div> | ||
<Feed /> | ||
</MaxWidth> | ||
</Layout> | ||
)} | ||
/> | ||
) | ||
|
||
export default HomePage; | ||
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") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
` |