diff options
Diffstat (limited to 'ui/src/components/sidebar.tsx')
-rw-r--r-- | ui/src/components/sidebar.tsx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index 51766923..dc2376d7 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -11,6 +11,7 @@ import { WebSocketService, UserService } from '../services'; import { mdToHtml, getUnixTime, hostname } from '../utils'; import { CommunityForm } from './community-form'; import { UserListing } from './user-listing'; +import { CommunityLink } from './community-link'; import { i18n } from '../i18next'; interface SidebarProps { @@ -66,7 +67,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> { name_ = community.name; link = `/c/${community.name}`; } else { - name_ = `${hostname(community.actor_id)}/${community.name}`; + name_ = `${community.name}@${hostname(community.actor_id)}`; link = community.actor_id; } return ( @@ -86,15 +87,7 @@ export class Sidebar extends Component<SidebarProps, SidebarState> { </small> )} </h5> - {community.local ? ( - <Link className="text-muted" to={link}> - {name_} - </Link> - ) : ( - <a className="text-muted" href={link} target="_blank"> - {name_} - </a> - )} + <CommunityLink community={community} realLink /> <ul class="list-inline mb-1 text-muted font-weight-bold"> {this.canMod && ( <> |