chore: url and email redirection added

This commit is contained in:
Aaryan Khandelwal 2023-09-21 18:12:23 +05:30
parent 998dc1bbae
commit c4143a1a64
3 changed files with 17 additions and 5 deletions

View File

@ -48,10 +48,16 @@ export const CustomEmailAttribute: React.FC<Props> = ({ attributeDetails, onChan
<div className="flex-shrink-0">
{!isEditing && (
<div
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap"
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap rounded"
onClick={() => setIsEditing(true)}
>
{value && value !== "" ? value : "Empty"}
{value && value !== "" ? (
<a href={`mailto:${value}`} target="_blank" rel="noopener noreferrer">
{value}
</a>
) : (
"Empty"
)}
</div>
)}
{isEditing && (

View File

@ -54,7 +54,7 @@ export const CustomTextAttribute: React.FC<Props & { value: string | undefined }
<div className="flex-shrink-0">
{!isEditing && (
<div
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap"
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap rounded"
onClick={() => setIsEditing(true)}
>
{value && value !== "" ? value : `Enter ${attributeDetails.display_name}`}

View File

@ -52,10 +52,16 @@ export const CustomUrlAttribute: React.FC<Props & { value: string | undefined }>
<div className="flex-shrink-0">
{!isEditing && (
<div
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap"
className="cursor-pointer text-xs truncate bg-custom-background-80 px-2.5 py-0.5 w-min max-w-full whitespace-nowrap rounded"
onClick={() => setIsEditing(true)}
>
{value && value !== "" ? value : "Empty"}
{value && value !== "" ? (
<a href={value} target="_blank" rel="noopener noreferrer">
{value}
</a>
) : (
"Empty"
)}
</div>
)}
{isEditing && (