Make the community title in the sidebar link to the local community. (#1161)

* Make the community title in the sidebar link to the local community.

* Ternary erudaStr for PR.

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
This commit is contained in:
cmp 2023-06-13 05:34:21 -05:00 committed by GitHub
parent 5f5ef404d2
commit 0d67c64af9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View file

@ -330,14 +330,15 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
.then(buf => buf.toString("base64"))}`
: favIconPngUrl;
const eruda = (
const erudaStr =
process.env["LEMMY_UI_DEBUG"] === "true"
? renderToString(
<>
<script src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
</>
);
const erudaStr = process.env["LEMMY_UI_DEBUG"] ? renderToString(eruda) : "";
)
: "";
const helmet = Helmet.renderStatic();

View file

@ -132,7 +132,9 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
{this.props.showIcon && !community.removed && (
<BannerIconHeader icon={community.icon} banner={community.banner} />
)}
<span className="mr-2">{community.title}</span>
<span className="mr-2">
<CommunityLink community={community} hideAvatar />
</span>
{subscribed === "Subscribed" && (
<button
className="btn btn-secondary btn-sm mr-2"