add beautifyString in block, integration and integration block

This commit is contained in:
Abhimanyu Yadav
2025-05-29 10:31:10 +05:30
parent 950a85e179
commit 1e89b6d3a4
3 changed files with 6 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import { beautifyString, cn } from "@/lib/utils";
import { Plus } from "lucide-react";
import React, { ButtonHTMLAttributes } from "react";
import { highlightText } from "./IntegrationBlock";
@@ -36,7 +36,7 @@ const Block: BlockComponent = ({
"line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400",
)}
>
{highlightText(title, highlightedText)}
{title && highlightText(beautifyString(title), highlightedText)}
</span>
<span
className={cn(

View File

@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import { beautifyString, cn } from "@/lib/utils";
import Image from "next/image";
import React, { ButtonHTMLAttributes } from "react";
@@ -47,7 +47,7 @@ const Integration: IntegrationComponent = ({
<div className="w-full">
<div className="flex items-center justify-between gap-2">
<p className="line-clamp-1 flex-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-700 group-disabled:text-zinc-400">
{title}
{title && beautifyString(title)}
</p>
<span className="flex h-[1.375rem] w-[1.6875rem] items-center justify-center rounded-[1.25rem] bg-[#f0f0f0] p-1.5 font-sans text-sm leading-[1.375rem] text-zinc-500 group-disabled:text-zinc-400">
{number_of_blocks}

View File

@@ -1,6 +1,6 @@
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { cn } from "@/lib/utils";
import { beautifyString, cn } from "@/lib/utils";
import { Plus } from "lucide-react";
import Image from "next/image";
import React, { ButtonHTMLAttributes } from "react";
@@ -66,7 +66,7 @@ const IntegrationBlock: IntegrationBlockComponent = ({
"line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400",
)}
>
{highlightText(title, highlightedText)}
{title && highlightText(beautifyString(title), highlightedText)}
</span>
<span
className={cn(