|
|
@ -1,11 +1,15 @@ |
|
|
|
import React, { Component } from "react" |
|
|
|
import { Route, Switch } from "react-router-dom"; |
|
|
|
import { Query } from "react-apollo" |
|
|
|
|
|
|
|
import Background from "../../common/Background" |
|
|
|
import StoryMenu from "./StoryMenu" |
|
|
|
import Background from "../../common/Background" |
|
|
|
import { LoadingScreen } from "../../common/LoadingScreen" |
|
|
|
|
|
|
|
import storyRootQuery from "./gql/StoryRoot" |
|
|
|
import { LoadingScreen } from "../../common/LoadingScreen" |
|
|
|
|
|
|
|
import StoryList from "./StoryList"; |
|
|
|
import StoryTags from "./StoryTags"; |
|
|
|
|
|
|
|
export class StoryIndex extends Component { |
|
|
|
render() { |
|
|
@ -15,6 +19,14 @@ export class StoryIndex extends Component { |
|
|
|
<div className="StoryIndex theme-story"> |
|
|
|
<Background /> |
|
|
|
<StoryMenu categories={categories} /> |
|
|
|
<Switch> |
|
|
|
<Route exact path="/story/" component={() => <StoryList filter={{limit: 16}} />} /> |
|
|
|
<Route exact path="/story/tags/" component={StoryTags} /> |
|
|
|
<Route exact path="/story/category/:category/" component={({category}) => <StoryList filter={{category}} />} /> |
|
|
|
<Route exact path="/story/your-content/" component={() => <StoryList filter={{author: "Gisle"}} />} /> |
|
|
|
<Route exact path="/story/your-content/open/" component={() => <StoryList filter={{open: true, author: "Gisle"}} />} /> |
|
|
|
<Route exact path="/story/your-content/unlisted/" component={() => <StoryList filter={{unlisted: true, author: "Gisle"}} />} /> |
|
|
|
</Switch> |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|