Fix channel member render
This commit is contained in:
parent
006a67ee01
commit
ce9a4c6b3d
|
@ -301,9 +301,9 @@ export class ReactAutoPatcher {
|
|||
this.ChannelMember.component = await ReactComponents.getComponent('ChannelMember');
|
||||
this.ChannelMember.component.on('render', ({ component, retVal, p }) => {
|
||||
const { user, isOwner } = component.props;
|
||||
retVal.props['data-member-id'] = user.id;
|
||||
if (user.id === DiscordApi.currentUser.id) retVal.props.className += ' bd-isCurrentUser';
|
||||
if (isOwner) retVal.props.className += ' bd-isOwner';
|
||||
retVal.props.children.props['data-member-id'] = user.id;
|
||||
if (user.id === DiscordApi.currentUser.id) retVal.props.children.props.className += ' bd-isCurrentUser';
|
||||
if (isOwner) retVal.props.children.props.className += ' bd-isOwner';
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue