]> Untitled Git - lemmy-ui.git/commitdiff
Make the community title in the sidebar link to the local community. (#1161)
authorcmp <me@porterca.com>
Tue, 13 Jun 2023 10:34:21 +0000 (05:34 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2023 10:34:21 +0000 (06:34 -0400)
* Make the community title in the sidebar link to the local community.

* Ternary erudaStr for PR.

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
src/server/index.tsx
src/shared/components/community/sidebar.tsx

index 8d9bb25560d90e8f89a5715ed1e78318071e537c..716a936dbd0cb4424cbb53884afec4ad76dce51f 100644 (file)
@@ -330,14 +330,15 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
         .then(buf => buf.toString("base64"))}`
     : favIconPngUrl;
 
-  const eruda = (
-    <>
-      <script src="//cdn.jsdelivr.net/npm/eruda"></script>
-      <script>eruda.init();</script>
-    </>
-  );
-
-  const erudaStr = process.env["LEMMY_UI_DEBUG"] ? renderToString(eruda) : "";
+  const erudaStr =
+    process.env["LEMMY_UI_DEBUG"] === "true"
+      ? renderToString(
+          <>
+            <script src="//cdn.jsdelivr.net/npm/eruda"></script>
+            <script>eruda.init();</script>
+          </>
+        )
+      : "";
 
   const helmet = Helmet.renderStatic();
 
index b55bd506448255e79ad0bc709f39df522ed3ad9e..d592571c5a83604edfcd9581295e4efeeaa7fc40 100644 (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"