diff --git a/rpdata-ui/src/App.js b/rpdata-ui/src/App.js
index 72ef7f8..e620b3b 100644
--- a/rpdata-ui/src/App.js
+++ b/rpdata-ui/src/App.js
@@ -4,7 +4,7 @@ import { Route, Router, Redirect, Switch } from "react-router-dom";
import StoryRoot from './routes/story/StoryRoot';
import LogsIndex from './routes/logs/LogsIndex';
-class App extends Component {
+export default class App extends Component {
render() {
return (
@@ -18,6 +18,4 @@ class App extends Component {
}
}
-export default App;
-
/* See ./common/Menu.js to change the top navbar */
\ No newline at end of file
diff --git a/rpdata-ui/src/routes/story/StoryRoot.js b/rpdata-ui/src/routes/story/StoryRoot.js
index 6a3f62a..af48b91 100644
--- a/rpdata-ui/src/routes/story/StoryRoot.js
+++ b/rpdata-ui/src/routes/story/StoryRoot.js
@@ -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 () => (
-
+
{({ loading, error, data }) => {
- if (loading) return 'Loading...';
+ if (loading) return ;
if (error) return `Error! ${error.message}`;
return
diff --git a/rpdata-ui/src/routes/story/gql/StoryIndex.js b/rpdata-ui/src/routes/story/gql/StoryRoot.js
similarity index 53%
rename from rpdata-ui/src/routes/story/gql/StoryIndex.js
rename to rpdata-ui/src/routes/story/gql/StoryRoot.js
index 9f7e0d8..e1b902d 100644
--- a/rpdata-ui/src/routes/story/gql/StoryIndex.js
+++ b/rpdata-ui/src/routes/story/gql/StoryRoot.js
@@ -1,23 +1,12 @@
import gql from "graphql-tag"
export default gql`
- query StoryIndex {
+ query StoryRoot {
categoryType: __type(name: "StoryCategory") {
enumValues {
name
description
}
}
-
- stories(input: {}) {
- id
- name
- author
- open
- tags {
- kind
- name
- }
- }
}
`
\ No newline at end of file