[APM UI] Remove unnecessary package usage (#88646)

This commit is contained in:
Shahzad 2021-01-19 18:20:13 +01:00 committed by GitHub
parent cd99e6ec56
commit 211312d6a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import url from 'url';
export const getTraceUrl = ({
traceId,
@ -14,8 +13,8 @@ export const getTraceUrl = ({
rangeFrom: string;
rangeTo: string;
}) => {
return url.format({
pathname: `/link-to/trace/${traceId}`,
query: { rangeFrom, rangeTo },
});
return (
`/link-to/trace/${traceId}?` +
new URLSearchParams({ rangeFrom, rangeTo }).toString()
);
};