diff --git a/src/components/cards/cardBlog.tsx b/src/components/cards/cardBlog.tsx index 5e5b396..859c7ed 100644 --- a/src/components/cards/cardBlog.tsx +++ b/src/components/cards/cardBlog.tsx @@ -14,6 +14,14 @@ export default async function CardBlog({ isAdmin, }: CardBlogProps) { const router = useRouter(); + + const descriptionLength = description.length; + + const descriptionLimit = 50; + + const limitedDescription = description.slice(0, descriptionLimit); + + const handleDelete = async () => { try { const deletePost = async () => { @@ -42,9 +50,9 @@ export default async function CardBlog({ return ( <> -
{date}
{description}
+{limitedDescription}...