|
|
@ -4,7 +4,8 @@ import { Query } from 'react-apollo'; |
|
|
|
import Background from '../../common/Background'; |
|
|
|
import StoryMenu from './StoryMenu'; |
|
|
|
|
|
|
|
import INDEX_QUERY from "./gql/StoryIndex"; |
|
|
|
import storyRootQuery from "./gql/StoryRoot"; |
|
|
|
import { LoadingScreen } from '../../common/LoadingScreen'; |
|
|
|
|
|
|
|
export class StoryIndex extends Component { |
|
|
|
render() { |
|
|
@ -20,9 +21,9 @@ export class StoryIndex extends Component { |
|
|
|
} |
|
|
|
|
|
|
|
export default () => ( |
|
|
|
<Query query={INDEX_QUERY}> |
|
|
|
<Query query={storyRootQuery}> |
|
|
|
{({ loading, error, data }) => { |
|
|
|
if (loading) return 'Loading...'; |
|
|
|
if (loading) return <LoadingScreen className="theme-story" />; |
|
|
|
if (error) return `Error! ${error.message}`; |
|
|
|
|
|
|
|
return <StoryIndex {...data} /> |
|
|
|