From faf29ccfad3a42a4164ab056129f9de7d1ec9c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Gyebrovszki?= Date: Fri, 17 Nov 2023 01:47:03 +0100 Subject: [PATCH] Remove ".settings" from content-card's title. --- apps/sensenet/src/components/settings/content-card.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/sensenet/src/components/settings/content-card.tsx b/apps/sensenet/src/components/settings/content-card.tsx index 87fd3cc57..67fbc6b1e 100644 --- a/apps/sensenet/src/components/settings/content-card.tsx +++ b/apps/sensenet/src/components/settings/content-card.tsx @@ -57,6 +57,8 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => { const uiSettings = useContext(ResponsivePersonalSettings) const history = useHistory() const classes = useStyles() + const settingsName = settings.DisplayName || settings.Name + const settingsTitle = settingsName.replace(/.settings/gi, '') return ( { onContextMenu(ev) }} className={classes.card} - data-test={`content-card-${settings.DisplayName?.replace(/\s+/g, '-').toLowerCase()}`}> + data-test={`content-card-${settingsName.replace(/\s+/g, '-').toLowerCase()}`}> - + - {settings.DisplayName || settings.Name} + {settingsTitle}