Skip to content

Commit 642c0c0

Browse files
Max length title
1 parent b5bc916 commit 642c0c0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

statusphere-frontend/src/components/Outages.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export function Outages(props: OutagesProps) {
4242
<Card className={"bg-white"}>
4343
<CardHeader className={"items-left"}>
4444
<CardTitle className={"scroll-m-20 text-xl font-semibold tracking-tight"}>
45-
Incidents are not currently indexed for {props.statusPageDetails.name}
45+
Incidents are not currently indexed for {props.statusPageDetails.name}
4646
</CardTitle>
4747
<CardDescription className={"leading-7 [&:not(:first-child)]:mt-6"}>
48-
You can view the official status page at: <a
49-
href={props.statusPageDetails.url}> {props.statusPageDetails.name} status page</a>
48+
You can view the official status page at: <a
49+
href={props.statusPageDetails.url}> {props.statusPageDetails.name} status page</a>
5050
</CardDescription>
5151
</CardHeader>
5252
</Card>
@@ -80,7 +80,12 @@ export function Outages(props: OutagesProps) {
8080
<TableRow>
8181
<TableCell>{convertToSimpleDate(incident.startTime)}</TableCell>
8282
<TableCell className={"max-w-[300px] break-words"}><a className={"max-w-[300px] break-words"}
83-
href={incident.deepLink}> {incident.title} </a></TableCell>
83+
href={incident.deepLink}> {(() => {
84+
if (incident.title.length > 50) {
85+
return incident.title.substring(0, 50)
86+
}
87+
return incident.title
88+
})()} </a></TableCell>
8489
<TableCell>
8590
<Badge className={getBadgeColour(incident.impact)}>{incident.impact}</Badge>
8691
</TableCell>

0 commit comments

Comments
 (0)