refactor: use shared trimming function

This commit is contained in:
zhom
2025-07-28 02:29:45 +04:00
parent e1d3ff9000
commit f024ce19ae
+1 -4
View File
@@ -18,6 +18,7 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/components/ui/tooltip";
import { trimName } from "@/lib/name-utils";
import type { StoredProxy } from "@/types";
interface ProxyManagementDialogProps {
@@ -102,10 +103,6 @@ export function ProxyManagementDialog({
setEditingProxy(null);
}, []);
const trimName = useCallback((name: string) => {
return name.length > 30 ? `${name.substring(0, 30)}...` : name;
}, []);
return (
<>
<Dialog open={isOpen} onOpenChange={onClose}>