From 8b2a866994cab9a85e2253012b77f8d32118cb36 Mon Sep 17 00:00:00 2001 From: McPizza Date: Wed, 4 Dec 2024 23:32:55 +0000 Subject: [PATCH] fix nits --- .../components/notifications/Notifications.tsx | 16 +++++++++++----- .../src/components/v2/CopyButton/CopyButton.tsx | 6 ++---- frontend/src/reactQuery.tsx | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/notifications/Notifications.tsx b/frontend/src/components/notifications/Notifications.tsx index 41e8194ea..fdc35b9af 100644 --- a/frontend/src/components/notifications/Notifications.tsx +++ b/frontend/src/components/notifications/Notifications.tsx @@ -9,24 +9,30 @@ export type TNotification = { title?: string; text: ReactNode; children?: ReactNode; - cta?: ReactNode; + callToAction?: ReactNode; copyActions?: { icon?: IconDefinition; value: string; name: string; label?: string }[]; }; -export const NotificationContent = ({ title, text, children, cta, copyActions }: TNotification) => { +export const NotificationContent = ({ + title, + text, + children, + callToAction, + copyActions +}: TNotification) => { return (
{title &&
{title}
}
{text}
{children &&
{children}
} - {(cta || copyActions) && ( + {(callToAction || copyActions) && (
- {cta} + {callToAction} {copyActions && (
diff --git a/frontend/src/components/v2/CopyButton/CopyButton.tsx b/frontend/src/components/v2/CopyButton/CopyButton.tsx index 63db5901e..ff1161ca9 100644 --- a/frontend/src/components/v2/CopyButton/CopyButton.tsx +++ b/frontend/src/components/v2/CopyButton/CopyButton.tsx @@ -24,10 +24,8 @@ export const CopyButton = ({ name, icon = faCopy }: CopyButtonProps) => { - const tooltipText = name ? `Copy ${name}` : "Copy to clipboard"; - const [copyText, isCopying, setCopyText] = useTimedReset({ - initialState: tooltipText + initialState: name ? `Copy ${name}` : "Copy to clipboard" }); async function handleCopyText() { @@ -39,7 +37,7 @@ export const CopyButton = ({