import { shell } from './shell' /** * Function to navigate by the root level. * Different from the `navigate` method provided by the render-runtime, * which only navigates by pathname, this function changes the entire * url, from protocol to pathname of the topmost window. * * ## @example * * ```jsx * import { navigate } from `admin-shell-utils` * * const App = () => { * return ( * navigate('https://some.url')}>Navigate to some.url * ) * } * ``` * */ export function navigate(href: string) { shell.location.href = href }