mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-12-22 20:47:44 +00:00
🔧 chore: usememo dependencies
This commit is contained in:
parent
bb7a88f7e9
commit
c8a153ad27
@ -58,13 +58,16 @@ export const SimpleToast = ({
|
||||
))}
|
||||
</div>
|
||||
) : null,
|
||||
[],
|
||||
[cta],
|
||||
);
|
||||
|
||||
const renderCloseButton = () => (
|
||||
<div onClick={() => onDismiss(props.id)} className={closeIconCls()}>
|
||||
<CrossIcon className="h-3 w-3" />
|
||||
</div>
|
||||
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