Skip to content

Commit

Permalink
Remove loading state from AccountProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Jul 30, 2018
1 parent aa009e1 commit ba99512
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/components/AccountProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ export const AccountContext = React.createContext({});

export const AccountProvider = props => (
<Query query={query}>
{({ loading, error, data }) => {
if (loading) {
return (
<p>Loading...</p>
);
}
{({ error, data }) => {
if (error) return <p><strong>{error.message}</strong></p>;

return (
<AccountContext.Provider value={data}>
{props.children}
Expand Down

0 comments on commit ba99512

Please sign in to comment.