export function generateUrlWithQuery(url, queries) {
    return queries
      ? `${url}${concatQueries(queries)}`
      : url
}

function concatQueries(queries) {
    return queries
        ? `?${Object.keys(queries).map((key) => `${key}=${(queries[key])}`).join('&')}`
        : '';
}
