1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

15 lines
305 B
React
Raw Normal View History

2018-09-16 19:56:22 +02:00
/*
* Routing helpers: Make query link with props (q and sorting)
*/
2018-09-17 16:42:58 +02:00
import {urlEscape} from 'components/utils/query'
2018-09-16 19:56:22 +02:00
export const makeQueryLinkProps = function(routing, query, sort, order) {
return {
pathname: routing.pathname,
2018-09-17 16:42:58 +02:00
search: `?s=${sort}&o=${order}&q=${urlEscape(query)}`
2018-09-16 19:56:22 +02:00
};
}