UNPKG

@fleetbase/ember-ui

Version:

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

13 lines (10 loc) 383 B
export default function removeUrlParam(key, callback) { const urlParams = new URLSearchParams(window.location.search); urlParams.delete(key); // Update the URL with the removed parameter history.replaceState(null, null, '?' + urlParams.toString()); // Call the provided callback if (callback && typeof callback === 'function') { callback(); } }