Skip to content

Commit

Permalink
fix: break words first, break all second
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Oct 21, 2024
1 parent a8206f5 commit f425eee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions frontend/src/component/personalDashboard/LatestProjectEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ const StyledUserAvatar = styled(UserAvatar)(({ theme }) => ({
}));

const StyledMarkdown = styled(Markdown)(({ theme }) => ({
wordBreak: 'break-all',
wordBreak: 'break-word',
}));

const BreakLongWordsFallback = styled('div')({
wordBreak: 'break-all',
});

export const LatestProjectEvents: FC<{
latestEvents: PersonalDashboardProjectDetailsSchema['latestEvents'];
}> = ({ latestEvents }) => {
Expand Down Expand Up @@ -77,10 +81,12 @@ export const LatestProjectEvents: FC<{
locationSettings.locale,
)}
</Timestamp>
<StyledMarkdown>
{event.summary ||
'No preview available for this event'}
</StyledMarkdown>
<BreakLongWordsFallback>
<StyledMarkdown>
{event.summary ||
'No preview available for this event'}
</StyledMarkdown>
</BreakLongWordsFallback>
</div>
</Event>
);
Expand Down

0 comments on commit f425eee

Please sign in to comment.