mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
always show community name with instance for easy copy-pasting to friends (#2073)
* always show community name with instance for easy copy-pasting to friends I don't like the inconsistency of community names currently, the UI shouldn't be presenting things differently because of technical reasons that are hard for users to understand. This makes it easier to share communities with your friends! * always show community name with instance, cleanup
This commit is contained in:
parent
b2927c36a2
commit
6224c4e378
1 changed files with 4 additions and 5 deletions
|
@ -21,20 +21,19 @@ export class CommunityLink extends Component<CommunityLinkProps, any> {
|
|||
|
||||
render() {
|
||||
const community = this.props.community;
|
||||
let name_: string, title: string, link: string;
|
||||
let title: string, link: string;
|
||||
const local = community.local === null ? true : community.local;
|
||||
const domain = hostname(community.actor_id);
|
||||
if (local) {
|
||||
name_ = community.name;
|
||||
title = community.title;
|
||||
link = `/c/${community.name}`;
|
||||
} else {
|
||||
const domain = hostname(community.actor_id);
|
||||
name_ = `${community.name}@${domain}`;
|
||||
const name_ = `${community.name}@${domain}`;
|
||||
title = `${community.title}@${domain}`;
|
||||
link = !this.props.realLink ? `/c/${name_}` : community.actor_id;
|
||||
}
|
||||
|
||||
const apubName = `!${name_}`;
|
||||
const apubName = `!${community.name}@${domain}`;
|
||||
const displayName = this.props.useApubName ? apubName : title;
|
||||
return !this.props.realLink ? (
|
||||
<Link
|
||||
|
|
Loading…
Reference in a new issue