Skip to content

Commit

Permalink
Merge pull request ansible#5510 from jakemcdermott/ui-next-fix-user-l…
Browse files Browse the repository at this point in the history
…ink-in

Fix access list and navigation user link-ins

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
softwarefactory-project-zuul[bot] authored Dec 16, 2019
2 parents c43a59e + a3bc398 commit cdf4b0d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ class PageHeaderToolbar extends Component {
</DropdownToggle>
}
dropdownItems={[
<DropdownItem key="user" href="#/home">
<DropdownItem
key="user"
href={
loggedInUser
? `#/users/${loggedInUser.id}/details`
: '#/home'
}
>
{i18n._(t`User Details`)}
</DropdownItem>,
<DropdownItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class ResourceAccessListItem extends React.Component {
<DataListCell key="name">
{accessRecord.username && (
<TextContent>
{accessRecord.url ? (
{accessRecord.id ? (
<Text component={TextVariants.h6}>
<Link
to={{ pathname: accessRecord.url }}
to={{ pathname: `/users/${accessRecord.id}/details` }}
css="font-weight: bold"
>
{accessRecord.username}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
Expand Down Expand Up @@ -114,7 +114,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
Expand Down Expand Up @@ -193,7 +193,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<ForwardRef
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
Expand Down Expand Up @@ -260,7 +260,7 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
<Styled(Link)
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
Expand Down Expand Up @@ -308,26 +308,26 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
forwardedRef={null}
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
<Link
className="sc-bdVaJa fqQVUT"
to={
Object {
"pathname": "/bar",
"pathname": "/users/2/details",
}
}
>
<LinkAnchor
className="sc-bdVaJa fqQVUT"
href="/bar"
href="/users/2/details"
navigate={[Function]}
>
<a
className="sc-bdVaJa fqQVUT"
href="/bar"
href="/users/2/details"
onClick={[Function]}
>
jane
Expand Down

0 comments on commit cdf4b0d

Please sign in to comment.