Skip to content

Commit

Permalink
Remove ".settings" from content-card's title.
Browse files Browse the repository at this point in the history
  • Loading branch information
kavics committed Nov 17, 2023
1 parent 5746986 commit faf29cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/sensenet/src/components/settings/content-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Card
Expand All @@ -65,11 +67,11 @@ export const ContentCard = ({ settings, onContextMenu }: ContentCardProps) => {
onContextMenu(ev)
}}
className={classes.card}
data-test={`content-card-${settings.DisplayName?.replace(/\s+/g, '-').toLowerCase()}`}>
data-test={`content-card-${settingsName.replace(/\s+/g, '-').toLowerCase()}`}>
<CardContent>
<Tooltip placement="top" title={settings.DisplayName || settings.Name}>
<Tooltip placement="top" title={settingsName}>
<Typography variant="h5" gutterBottom={true} className={classes.title}>
{settings.DisplayName || settings.Name}
{settingsTitle}
</Typography>
</Tooltip>
<Typography
Expand Down

0 comments on commit faf29cc

Please sign in to comment.