We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77b43fe commit f4c52f6Copy full SHA for f4c52f6
src/components/EventCard.tsx
@@ -40,6 +40,12 @@ const EventCard = ({
40
new Date(endDate?.replace(/-/g, "/"))
41
)
42
43
+ const MAX_DESCRIPTION_CHARS = 230
44
+ const truncatedDescription =
45
+ description.length > MAX_DESCRIPTION_CHARS
46
+ ? `${description.slice(0, MAX_DESCRIPTION_CHARS)}...`
47
+ : description
48
+
49
return (
50
<Box
51
className={className}
@@ -108,7 +114,7 @@ const EventCard = ({
108
114
</Text>
109
115
</Box>
110
116
<Box>
111
- <Text fontSize="sm">{description}</Text>
117
+ <Text fontSize="sm">{truncatedDescription}</Text>
112
118
113
119
120
0 commit comments