mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-08 23:14:00 +00:00
This commit is contained in:
parent
157e749ffd
commit
a694dd5a04
@ -14,6 +14,7 @@
|
|||||||
import { isEmpty, isUndefined } from 'lodash';
|
import { isEmpty, isUndefined } from 'lodash';
|
||||||
import { EntityFieldThreads } from 'Models';
|
import { EntityFieldThreads } from 'Models';
|
||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
import { entityUrlMap } from '../constants/feed.constants';
|
||||||
import { EntityReference } from '../generated/entity/teams/user';
|
import { EntityReference } from '../generated/entity/teams/user';
|
||||||
import { getEntityFeedLink } from './EntityUtils';
|
import { getEntityFeedLink } from './EntityUtils';
|
||||||
import { getThreadField } from './FeedUtils';
|
import { getThreadField } from './FeedUtils';
|
||||||
@ -82,7 +83,9 @@ export const getDefaultValue = (owner: EntityReference) => {
|
|||||||
const name = owner.name;
|
const name = owner.name;
|
||||||
const displayName = owner.displayName;
|
const displayName = owner.displayName;
|
||||||
const entityType = owner.type;
|
const entityType = owner.type;
|
||||||
const mention = `<a href=${`${document.location.protocol}//${document.location.host}/${entityType}/${name}`}>@${displayName}</a>`;
|
const mention = `<a href=${`/${
|
||||||
|
entityUrlMap[entityType as keyof typeof entityUrlMap]
|
||||||
|
}/${name}`}>@${displayName}</a>`;
|
||||||
|
|
||||||
return `${mention} ${message}`;
|
return `${mention} ${message}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user