diff --git a/apps/web/components/shared/service-card.tsx b/apps/web/components/shared/service-card.tsx index aa30484..09e8237 100644 --- a/apps/web/components/shared/service-card.tsx +++ b/apps/web/components/shared/service-card.tsx @@ -19,6 +19,12 @@ export function ServiceCard({ }: Readonly) { const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false); + const shouldShowExpandButton = + description && + (description.length > 120 || + description.split('\n').length > 2 || + (description.length > 80 && description.includes('\n'))); + return (
{description}
- {description.length > 100 && ( + + {shouldShowExpandButton && (
{ event.preventDefault();