mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-10 16:33:48 +00:00
fix(ui): URL encode urns for ownership entity links (#6814)
This commit is contained in:
parent
5584bfb469
commit
cd937e0c67
@ -10,6 +10,7 @@ import { useEntityRegistry } from '../../../../useEntityRegistry';
|
|||||||
import analytics, { EventType, EntityActionType } from '../../../../analytics';
|
import analytics, { EventType, EntityActionType } from '../../../../analytics';
|
||||||
import { useEntityData } from '../../EntityContext';
|
import { useEntityData } from '../../EntityContext';
|
||||||
import { getDescriptionFromType, getNameFromType } from '../../containers/profile/sidebar/Ownership/ownershipUtils';
|
import { getDescriptionFromType, getNameFromType } from '../../containers/profile/sidebar/Ownership/ownershipUtils';
|
||||||
|
import { urlEncodeUrn } from '../../utils';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
entityUrn?: string;
|
entityUrn?: string;
|
||||||
@ -88,7 +89,7 @@ export const ExpandedOwner = ({ entityUrn, owner, hidePopOver, refetch }: Props)
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<OwnerTag onClose={onClose} closable={!!entityUrn}>
|
<OwnerTag onClose={onClose} closable={!!entityUrn}>
|
||||||
<Link to={`/${entityRegistry.getPathName(owner.owner.type)}/${owner.owner.urn}`}>
|
<Link to={`/${entityRegistry.getPathName(owner.owner.type)}/${urlEncodeUrn(owner.owner.urn)}`}>
|
||||||
<CustomAvatar name={name} photoUrl={pictureLink} useDefaultAvatar={false} />
|
<CustomAvatar name={name} photoUrl={pictureLink} useDefaultAvatar={false} />
|
||||||
{(hidePopOver && <>{name}</>) || (
|
{(hidePopOver && <>{name}</>) || (
|
||||||
<Popover
|
<Popover
|
||||||
|
Loading…
x
Reference in New Issue
Block a user