handle long names in the cards for route portal - ENG-2026 (#5514)

handle long names in the cards for route portal
This commit is contained in:
Nathan Hayfield 2025-03-03 21:07:25 +01:00 committed by GitHub
parent 6be4efd48b
commit ef48f8a0cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,8 +34,21 @@ const RouteCard: FC<RouteCardProps> = ({ route }) => {
}; };
return ( return (
<Card raised={true}> <Card
<CardActionArea href={route.from} target="_blank" onClick={handleClick}> raised={true}
sx={{
height: "100%",
display: "flex",
flexDirection: "column",
justifyContent: "space-between",
}}
>
<CardActionArea
sx={{ height: "100%" }}
href={route.from}
target="_blank"
onClick={handleClick}
>
<CardHeader <CardHeader
avatar={ avatar={
route.logo_url ? ( route.logo_url ? (
@ -67,7 +80,16 @@ const RouteCard: FC<RouteCardProps> = ({ route }) => {
</IconButton> </IconButton>
) )
} }
title={route.name} title={
<Box
component="span"
sx={{
wordBreak: "break-all",
}}
>
{route.name}
</Box>
}
/> />
<CardContent> <CardContent>
{route.description && ( {route.description && (