AccountPanelServerProfile: Fix buttons unusable and request spam

This commit is contained in:
Nuckyz 2025-01-22 17:40:47 -03:00
parent 9bb983d40c
commit 9e9d71d014
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 8 additions and 8 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: { OriginalComponent } }) => <OriginalComponent />
fallback: ({ wrappedProps: { originalComponent } }) => originalComponent()
})
});