Skip to content

Commit

Permalink
Fix keywords/* static rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
thangngoc89 committed Dec 26, 2017
1 parent 6a5f0dc commit b89537b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion App.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const routes = () => (
)}
/>
<Route
path="/keywords/*"
path="/keywords/:keywords"
component={createContainer(
KeywordDetailsRoute.jsComponent,
KeywordDetailsRoute.queries
Expand Down
12 changes: 7 additions & 5 deletions src/components/KeywordDetailsRoute.re
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@ let jsComponent =
ReasonReact.wrapReasonForJs(~component, jsProps =>
make(
~packages=
PhenomicPresetReactApp.jsEdgeToReason(jsProps##packages, a => a##list),
PhenomicPresetReactApp.jsEdgeToReason(jsProps##packageKeyword, a =>
a##list
),
~push=jsProps##router##push,
~keyword=jsProps##params##splat
~keyword=jsProps##params##keyword
)
);

let queries = props => {
let packages =
let packageKeyword =
PhenomicPresetReactApp.query(
List({
path: "packages",
by: Some("keywords"),
value: Some(props##params##splat),
value: Some(props##params##keywords),
order: Some("asc"),
limit: None
})
Expand All @@ -46,5 +48,5 @@ let queries = props => {
limit: Some(10)
after: Some(string)
*/
{"packages": packages};
{"packageKeyword": packageKeyword};
};

0 comments on commit b89537b

Please sign in to comment.