mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
groups: fix "remove from" / "leave group" text
When you were looking at your own card in another group, it would say "Remove from" group. This is from an arbitrarily strict ternary check that adminOpt catches for us, so we just check if the ship is us.
This commit is contained in:
parent
d1b73f7ae3
commit
b2b6c05992
@ -486,9 +486,6 @@ export class ContactCard extends Component {
|
||||
}
|
||||
|
||||
let ourOpt = (props.ship === window.ship) ? "dib" : "dn";
|
||||
let localOpt =
|
||||
((props.ship === window.ship) && (props.path === "/~/default"))
|
||||
? "dib" : "dn";
|
||||
|
||||
let adminOpt =
|
||||
((props.path.includes(`~${window.ship}/`)) || ((props.ship === window.ship) &&
|
||||
@ -532,7 +529,7 @@ export class ContactCard extends Component {
|
||||
`bg-gray0-d mv4 mh3 pa1 f9 red2 pointer flex-shrink-0 ` + adminOpt
|
||||
}
|
||||
onClick={this.removeFromGroup}>
|
||||
{props.ship === window.ship && props.path.includes(window.ship)
|
||||
{props.ship === window.ship
|
||||
? "Leave Group"
|
||||
: "Remove from Group"}
|
||||
</button>
|
||||
|
Loading…
Reference in New Issue
Block a user