BadgeApi, AccountPanelServerProfile: Fix not working (#3147)

This commit is contained in:
sadan4 2025-01-18 14:52:35 -05:00 committed by GitHub
parent c8f4ce9785
commit 19361ef790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View file

@ -16,7 +16,7 @@ interface UserMentionComponentProps {
id: string;
channelId: string;
guildId: string;
OriginalComponent: ReactNode;
OriginalComponent: () => ReactNode;
}
export default definePlugin({
@ -29,7 +29,7 @@ export default definePlugin({
find: ':"text":',
replacement: {
match: /(hidePersonalInformation\).+?)(if\(null!=\i\){.+?return \i)(?=})/,
replace: "$1return $self.UserMentionComponent({...arguments[0],OriginalComponent:(()=>{$2})()});"
replace: "$1return $self.UserMentionComponent({...arguments[0],OriginalComponent:()=>{$2}});"
}
}
],
@ -42,6 +42,6 @@ export default definePlugin({
channelId={props.channelId}
/>
), {
fallback: ({ wrappedProps }) => wrappedProps.OriginalComponent
fallback: ({ wrappedProps: { OriginalComponent } }) => <OriginalComponent />
})
});