fix(plugins/developer-kit): move IconComponent lookup outside function

This commit is contained in:
PalmDevs 2025-08-20 20:51:05 +07:00
parent 50a3804709
commit 68b84ea203
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -24,6 +24,12 @@ const events = new TypedEventEmitter<{
errored: [unknown]
}>()
const CircleXIcon = lookupGeneratedIconComponent(
'CircleXIcon',
'CircleXIcon-secondary',
'CircleXIcon-primary',
)
export function connect() {
if (!RDTContext.active || RDTContext.ws) return
@ -48,12 +54,7 @@ export function connect() {
ToastActionCreators.open({
key: 'REACT_DEVTOOLS_ERROR',
// TODO(PalmDevs): declare this on top of file once asset cache can be loaded earlier
IconComponent: lookupGeneratedIconComponent(
'CircleXIcon',
'CircleXIcon-secondary',
'CircleXIcon-primary',
),
IconComponent: CircleXIcon,
content: err,
})
})