forked from cerc-io/snowballtools-base
🔧 chore: usememo dependencies
This commit is contained in:
parent
bb7a88f7e9
commit
c8a153ad27
@ -58,13 +58,16 @@ export const SimpleToast = ({
|
||||
))}
|
||||
</div>
|
||||
) : null,
|
||||
[],
|
||||
[cta],
|
||||
);
|
||||
|
||||
const renderCloseButton = () => (
|
||||
const renderCloseButton = useMemo(
|
||||
() => (
|
||||
<div onClick={() => onDismiss(props.id)} className={closeIconCls()}>
|
||||
<CrossIcon className="h-3 w-3" />
|
||||
</div>
|
||||
),
|
||||
[],
|
||||
);
|
||||
|
||||
return (
|
||||
@ -75,7 +78,7 @@ export const SimpleToast = ({
|
||||
<p className={titleCls()}>{title}</p>
|
||||
</ToastPrimitive.Title>
|
||||
{renderCta}
|
||||
{renderCloseButton()}
|
||||
{renderCloseButton}
|
||||
</div>
|
||||
</ToastPrimitive.Root>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user