|
|
@ -1,11 +1,11 @@ |
|
|
|
import React, { Component } from 'react'; |
|
|
|
import { Query } from 'react-apollo'; |
|
|
|
import React, { Component } from "react" |
|
|
|
import { Query } from "react-apollo" |
|
|
|
|
|
|
|
import Background from '../../common/Background'; |
|
|
|
import StoryMenu from './StoryMenu'; |
|
|
|
import Background from "../../common/Background" |
|
|
|
import StoryMenu from "./StoryMenu" |
|
|
|
|
|
|
|
import storyRootQuery from "./gql/StoryRoot"; |
|
|
|
import { LoadingScreen } from '../../common/LoadingScreen'; |
|
|
|
import storyRootQuery from "./gql/StoryRoot" |
|
|
|
import { LoadingScreen } from "../../common/LoadingScreen" |
|
|
|
|
|
|
|
export class StoryIndex extends Component { |
|
|
|
render() { |
|
|
@ -23,10 +23,10 @@ export class StoryIndex extends Component { |
|
|
|
export default () => ( |
|
|
|
<Query query={storyRootQuery}> |
|
|
|
{({ loading, error, data }) => { |
|
|
|
if (loading) return <LoadingScreen className="theme-story" />; |
|
|
|
if (error) return `Error! ${error.message}`; |
|
|
|
if (loading) return <LoadingScreen className="theme-story" /> |
|
|
|
if (error) return `Error! ${error.message}` |
|
|
|
|
|
|
|
return <StoryIndex {...data} /> |
|
|
|
}} |
|
|
|
</Query> |
|
|
|
); |
|
|
|
) |