Streamlining search triggers and sub-views

This commit is contained in:
James Barnsley
2018-01-02 22:55:44 +13:00
parent 8e58d2f868
commit 90eda428c2
6 changed files with 124 additions and 61 deletions

View File

@ -16,7 +16,10 @@ export default class URILink extends React.Component{
render(){
var to = null;
var uri = encodeURIComponent(this.props.uri);
var uri = this.props.uri;
if (!this.props.unencoded){
uri = encodeURIComponent(uri);
}
switch (this.props.type){
@ -44,6 +47,10 @@ export default class URILink extends React.Component{
to = global.baseURL+'discover/recommendations/'+uri;
break;
case 'search':
to = global.baseURL+'search/'+uri;
break;
default:
to = null;
}