Skip to content

Commit

Permalink
Make the community title in the sidebar link to the local community. (#…
Browse files Browse the repository at this point in the history
…1161)

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

* Ternary erudaStr for PR.

---------

Co-authored-by: SleeplessOne1917 <[email protected]>
  • Loading branch information
camporter and SleeplessOne1917 authored Jun 13, 2023
1 parent 5f5ef40 commit 0d67c64
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 9 additions & 8 deletions src/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
4 changes: 3 additions & 1 deletion src/shared/components/community/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0d67c64

Please sign in to comment.