Fixed query for category lists not getting parameters

This commit is contained in:
2018-08-01 14:57:49 +02:00
parent c348a90b70
commit e5b4184106
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -28,6 +28,8 @@ export default ({filter}) => (
return `Error! ${error.message}`
}
console.log(filter);
return <StoryList {...data} />
}}
</Query>
+1 -1
View File
@@ -22,7 +22,7 @@ export class StoryIndex extends Component {
<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/category/:category/" component={({match: {params: {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"}} />} />