Fixed query for category lists not getting parameters
This commit is contained in:
@@ -28,6 +28,8 @@ export default ({filter}) => (
|
||||
return `Error! ${error.message}`
|
||||
}
|
||||
|
||||
console.log(filter);
|
||||
|
||||
return <StoryList {...data} />
|
||||
}}
|
||||
</Query>
|
||||
|
||||
@@ -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"}} />} />
|
||||
|
||||
Reference in New Issue
Block a user