Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix nits

McPizza8b2a866994ca
diff --git a/frontend/src/components/notifications/Notifications.tsx b/frontend/src/components/notifications/Notifications.tsx
index 41e8194ea9..fdc35b9af5 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 (
<div className="msg-container">
{title && <div className="text-md mb-1 font-medium">{title}</div>}
<div className={title ? "text-sm text-neutral-400" : "text-md"}>{text}</div>
{children && <div className="mt-2">{children}</div>}
- {(cta || copyActions) && (
+ {(callToAction || copyActions) && (
<div
className={twMerge(
"mt-2 flex h-7 w-full flex-row items-end gap-2",
- cta ? "justify-between" : "justify-end"
+ callToAction ? "justify-between" : "justify-end"
)}
>
- {cta}
+ {callToAction}
{copyActions && (
<div className="flex h-7 flex-row items-center gap-2">
diff --git a/frontend/src/components/v2/CopyButton/CopyButton.tsx b/frontend/src/components/v2/CopyButton/CopyButton.tsx
index 63db5901e7..ff1161ca90 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<string>({
- initialState: tooltipText
+ initialState: name ? `Copy ${name}` : "Copy to clipboard"
});
async function handleCopyText() {
@@ -39,7 +37,7 @@ export const CopyButton = ({
<div>
<Tooltip content={copyText} size={size === "xs" || size === "sm" ? "sm" : "md"}>
<IconButton
- ariaLabel={tooltipText}
+ ariaLabel={copyText}
variant={variant}
className={twMerge("group relative", color)}
size={size}
diff --git a/frontend/src/reactQuery.tsx b/frontend/src/reactQuery.tsx
index c5e3d0e3b2..8e5d674ca3 100644
--- a/frontend/src/reactQuery.tsx
+++ b/frontend/src/reactQuery.tsx
@@ -33,7 +33,7 @@ export const queryClient = new QueryClient({
title: "Validation Error",
type: "error",
text: "Please check the input and try again.",
- cta: (
+ callToAction: (
<Modal>
<ModalTrigger>
<Button variant="outline_bg" size="xs">
@@ -80,7 +80,7 @@ export const queryClient = new QueryClient({
title: "Forbidden Access",
type: "error",
text: `${serverResponse.message}.`,
- cta: serverResponse?.details?.length ? (
+ callToAction: serverResponse?.details?.length ? (
<Modal>
<ModalTrigger>
<Button variant="outline_bg" size="xs">