I am using:

```
window.location.replace('https://site.sharepoint.com/sites/contosoSite')

```

Also I tried using `href`. 

The problem is that when I clicked on the button for redirection the new page is opened nested to the previous page. 

```
$('#ok').on('click', () => {    
     window.location.replace('https://condoso.sharepoint.com/sites/contosoSite');
})

```