[Patcher > Notices] Use findInReactTree in patch

pull/83/head
CanadaHonk 2 years ago committed by GitHub
parent 7596dcda11
commit 30165129d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,8 +43,7 @@ export const setThisScope = async (scope) => {
}
PatcherBase.patch(baseOwnerInstance.props.children[0], 'type', (_args, ret) => {
ret.props.children[1].props.children[1].props.children.props.children.unshift(React.createElement(NoticeContainer));
goosemod.reactUtils.findInReactTree(ret, x => x.className === BaseClasses.base).children.unshift(React.createElement(NoticeContainer));
return ret;
});
@ -91,4 +90,4 @@ export const patch = (content, buttonText, clickHandler, colorKey = 'brand') =>
});
updateCall();
};
};

Loading…
Cancel
Save