-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(template-react): remove graphql from default template
This commit removes the `hops-graphql` support from the default `hops-template-react`. BREAKING CHANGE: `hops-template-react` (default template) now no longer supports graphql out of the box. You can add the support yourself again or use a different template (we will provide a new `hops-template-graphql` shortly). Closes: #276
- Loading branch information
1 parent
a5de350
commit 4533445
Showing
7 changed files
with
21 additions
and
121 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
This file was deleted.
Oops, something went wrong.
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,31 +1,19 @@ | ||
// @flow | ||
import React from 'react'; | ||
import Helmet from 'react-helmet'; | ||
import { graphql } from 'react-apollo'; | ||
|
||
import styles from './styles.css'; | ||
import query from './commits.gql'; | ||
|
||
export const withCommits = graphql(query); | ||
|
||
export const Home = ({ data: { loading, github } }) => ( | ||
<div> | ||
<Helmet> | ||
<title>Hops Demo</title> | ||
</Helmet> | ||
<h1 className={styles.headline}> | ||
Hello World! | ||
</h1> | ||
{ | ||
(loading) | ||
? (<p>Loading...</p>) | ||
: (github.repo.commits.map(commit => ( | ||
<p key={commit.sha}> | ||
"{commit.message}" by <b>{commit.author.login}</b> | ||
</p> | ||
))) | ||
} | ||
</div> | ||
); | ||
|
||
export default withCommits(Home); | ||
export default function Home () { | ||
return ( | ||
<div> | ||
<Helmet> | ||
<title>Hops Demo</title> | ||
</Helmet> | ||
<h1 className={styles.headline}> | ||
Hello World! | ||
</h1> | ||
</div> | ||
); | ||
} |
23 changes: 1 addition & 22 deletions
23
packages/template-react/src/home/spec/__snapshots__/home.spec.js.snap
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,32 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders loaded state correctly 1`] = ` | ||
exports[`renders correctly 1`] = ` | ||
<div> | ||
<h1 | ||
className="headline" | ||
> | ||
Hello World! | ||
</h1> | ||
<p> | ||
" | ||
bar | ||
" by | ||
<b> | ||
baz | ||
</b> | ||
</p> | ||
</div> | ||
`; | ||
|
||
exports[`renders loading state correctly 1`] = ` | ||
<div> | ||
<h1 | ||
className="headline" | ||
> | ||
Hello World! | ||
</h1> | ||
<p> | ||
Loading... | ||
</p> | ||
</div> | ||
`; |
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