Show page - disable click for workspace member relation (#3464)

* [Draft] Add disable logic + failing test

* Fix test

* Remove hook

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Thomas Trompette
2024-01-18 18:22:26 +01:00
committed by GitHub
parent d8c9a94e14
commit c868347552
2 changed files with 73 additions and 1 deletions

View File

@ -56,7 +56,12 @@ export const getObjectRecordIdentifier = ({
objectMetadataItem,
});
const linkToShowPage = `${basePathToShowPage}${record.id}`;
const isWorkspaceMemberObjectMetadata =
objectMetadataItem.nameSingular === CoreObjectNameSingular.WorkspaceMember;
const linkToShowPage = isWorkspaceMemberObjectMetadata
? ''
: `${basePathToShowPage}${record.id}`;
return {
id: record.id,