Browse Source

Fixed query for category lists not getting parameters

1.0
Gisle Aune 6 years ago
parent
commit
e5b4184106
  1. 2
      rpdata-ui/src/routes/story/StoryList.js
  2. 2
      rpdata-ui/src/routes/story/StoryRoot.js

2
rpdata-ui/src/routes/story/StoryList.js

@ -28,6 +28,8 @@ export default ({filter}) => (
return `Error! ${error.message}` return `Error! ${error.message}`
} }
console.log(filter);
return <StoryList {...data} /> return <StoryList {...data} />
}} }}
</Query> </Query>

2
rpdata-ui/src/routes/story/StoryRoot.js

@ -22,7 +22,7 @@ export class StoryIndex extends Component {
<Switch> <Switch>
<Route exact path="/story/" component={() => <StoryList filter={{limit: 16}} />} /> <Route exact path="/story/" component={() => <StoryList filter={{limit: 16}} />} />
<Route exact path="/story/tags/" component={StoryTags} /> <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/" 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/open/" component={() => <StoryList filter={{open: true, author: "Gisle"}} />} />
<Route exact path="/story/your-content/unlisted/" component={() => <StoryList filter={{unlisted: true, author: "Gisle"}} />} /> <Route exact path="/story/your-content/unlisted/" component={() => <StoryList filter={{unlisted: true, author: "Gisle"}} />} />

Loading…
Cancel
Save