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>
|
</div>
|
||||||
) : null,
|
) : null,
|
||||||
[],
|
[cta],
|
||||||
);
|
);
|
||||||
|
|
||||||
const renderCloseButton = () => (
|
const renderCloseButton = useMemo(
|
||||||
<div onClick={() => onDismiss(props.id)} className={closeIconCls()}>
|
() => (
|
||||||
<CrossIcon className="h-3 w-3" />
|
<div onClick={() => onDismiss(props.id)} className={closeIconCls()}>
|
||||||
</div>
|
<CrossIcon className="h-3 w-3" />
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -75,7 +78,7 @@ export const SimpleToast = ({
|
|||||||
<p className={titleCls()}>{title}</p>
|
<p className={titleCls()}>{title}</p>
|
||||||
</ToastPrimitive.Title>
|
</ToastPrimitive.Title>
|
||||||
{renderCta}
|
{renderCta}
|
||||||
{renderCloseButton()}
|
{renderCloseButton}
|
||||||
</div>
|
</div>
|
||||||
</ToastPrimitive.Root>
|
</ToastPrimitive.Root>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user