diff --git a/app/css/interceptor.css b/app/css/interceptor.css
index 59536b78..15945463 100644
--- a/app/css/interceptor.css
+++ b/app/css/interceptor.css
@@ -1740,7 +1740,7 @@ header:has(form[role='search']) h1 {
--bg-color: transparent;
--button-color: #77738ccc;
--image-size: 2.25rem;
- --min-text-width: 3ch;
+ --min-text-width: 0;
--pad-x: 0;
--pad-y: 0;
--gap-x: 0.5rem;
@@ -1757,7 +1757,7 @@ header:has(form[role='search']) h1 {
padding-inline: var(--pad-x);
background-color: var(--bg-color);
border-radius: var(--edge-roundness);
- min-width: calc(var(--min-text-width) + var(--image-size) + (var(-pad-x) * 2) + var(--gap-x));
+ min-width: calc(var(--min-text-width) + var(--image-size) + (var(--pad-x) * 2) + var(--gap-x));
data {
line-height: 1em;
diff --git a/app/ts/components/subcomponents/MultilineCard.tsx b/app/ts/components/subcomponents/MultilineCard.tsx
index 5de0b664..e769a3ae 100644
--- a/app/ts/components/subcomponents/MultilineCard.tsx
+++ b/app/ts/components/subcomponents/MultilineCard.tsx
@@ -30,7 +30,7 @@ export type ActionableIconProps = {
icon: () => JSX.Element
hintText?: string
action: 'clipboard-copy'
- copyValue: string
+ copyValue?: string
copySuccessMessage?: string
} | {
icon: () => JSX.Element
diff --git a/app/ts/components/subcomponents/address.tsx b/app/ts/components/subcomponents/address.tsx
index 742cd6cc..6b52a3e1 100644
--- a/app/ts/components/subcomponents/address.tsx
+++ b/app/ts/components/subcomponents/address.tsx
@@ -68,46 +68,30 @@ export function BigAddress(params: BigAddressParams) {
onClick: () => params.addressBookEntry && params.renameAddressCallBack(params.addressBookEntry)
}
+ const setupCopyAction = {
+ action: 'clipboard-copy' as const,
+ copyValue: addressString,
+ copySuccessMessage: 'Address copied!'
+ }
+
+ const setupEditAction = { action: !params.noEditAddress ? renameAddressAction : undefined }
+
const labelConfig: ActionableTextProps = {
displayText: labelText,
- ...(labelText === addressString && params.noCopying === undefined) ? {
- action: 'clipboard-copy',
- copyValue: addressString,
- copySuccessMessage: 'Address copied!'
- } : {
- action: params.noEditAddress === undefined ? renameAddressAction : undefined
- }
+ ...(labelText === addressString && !params.noCopying) ? setupCopyAction : setupEditAction
}
const noteConfig: ActionableTextProps = {
displayText: noteText,
- ...(noteText === addressString && !params.noCopying) ? {
- action: 'clipboard-copy',
- copyValue: addressString,
- copySuccessMessage: 'Address copied!'
- } : {
- action: params.noEditAddress === undefined ? renameAddressAction : undefined
- }
+ ...(noteText === addressString && !params.noCopying) ? setupCopyAction : setupEditAction
}
const iconConfig: ActionableIconProps = {
icon: () => params.addressBookEntry ? : <>>,
- ...(!params.noCopying && addressString) ? {
- action: 'clipboard-copy',
- copyValue: addressString
- } : {
- action: undefined
- }
+ ...(!params.noCopying && addressString) ? setupCopyAction : { action: undefined }
}
- return (
-
- )
+ return
}
type ActiveAddressParams = {