File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
internal/portal/src/scenes/Destination Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
1414} from "../../typings/Destination" ;
1515import getLogo from "../../utils/logo" ;
1616import DestinationSettings from "./DestinationSettings/DestinationSettings" ;
17- import Events , { EventRoutes } from "./Events/Events" ;
17+ import { EventRoutes } from "./Events/Events" ;
1818
1919// Define the tab interface
2020interface Tab {
@@ -237,11 +237,13 @@ const Destination = () => {
237237
238238export default Destination ;
239239
240+ const TRUNCATION_LENGTH = 32 ;
241+
240242function DestinationDetailsField ( props : {
241243 type : DestinationTypeReference ;
242244 fieldType : "config" | "credentials" ;
243245 fieldKey : string ;
244- value : JSX . Element ;
246+ value : JSX . Element | string ;
245247} ) {
246248 let label = "" ;
247249 if ( props . fieldType === "config" ) {
@@ -267,7 +269,11 @@ function DestinationDetailsField(props: {
267269 return (
268270 < li >
269271 < span className = "body-m" > { label } </ span >
270- < span className = "mono-s" > { props . value } </ span >
272+ < span className = "mono-s" title = { typeof props . value === "string" && props . fieldType !== "credentials" ? props . value : undefined } >
273+ { typeof props . value === "string" && props . value . length > TRUNCATION_LENGTH
274+ ? `${ props . value . substring ( 0 , TRUNCATION_LENGTH ) } ...`
275+ : props . value }
276+ </ span >
271277 </ li >
272278 ) ;
273279}
You can’t perform that action at this time.
0 commit comments