Merge pull request #10202 from tiagodread/3420-fix

Use non-root path links

Resolves ansible/tower#3420
Use non-root path for links

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-05-14 13:44:45 +00:00 committed by GitHub
commit f1767d05b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -151,8 +151,8 @@ function PageHeaderToolbar({
aria-label={t`User details`}
href={
loggedInUser
? `/#/users/${loggedInUser.id}/details`
: '/#/home'
? `#/users/${loggedInUser.id}/details`
: '#/home'
}
>
{t`User Details`}

View File

@ -60,7 +60,7 @@ describe('PageHeaderToolbar', () => {
wrapper.update();
expect(
wrapper.find('DropdownItem[aria-label="User details"]').prop('href')
).toBe('/#/users/1/details');
).toBe('#/users/1/details');
expect(wrapper.find('DropdownItem')).toHaveLength(2);
const logout = wrapper.find('DropdownItem li button');

View File

@ -15,7 +15,7 @@ import ErrorDetail from '../ErrorDetail';
async function logout() {
await RootAPI.logout();
window.location.replace('/#/login');
window.location.replace('#/login');
}
function ContentError({ error, children, isNotFound }) {