]> Untitled Git - lemmy-ui.git/commitdiff
Make community IDs more easily selectable (#1306)
authorSunny <roesch.eric@protonmail.com>
Fri, 16 Jun 2023 15:00:01 +0000 (15:00 +0000)
committerGitHub <noreply@github.com>
Fri, 16 Jun 2023 15:00:01 +0000 (11:00 -0400)
* Make community IDs more easily selectable

* Use T component for alert

* Use T component for alert

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
src/shared/components/community/sidebar.tsx

index a5c620f3b4b5704e8763a4d549af8fbd97c877d8..63378a18f4ad8baf1b816be3a5c630f20f387dc7 100644 (file)
@@ -1,4 +1,5 @@
 import { Component, InfernoNode, linkEvent } from "inferno";
+import { T } from "inferno-i18next-dess";
 import { Link } from "inferno-router";
 import {
   AddModToCommunity,
@@ -144,10 +145,15 @@ export class Sidebar extends Component<SidebarProps, SidebarState> {
             {myUSerInfo && this.blockCommunity()}
             {!myUSerInfo && (
               <div className="alert alert-info" role="alert">
-                {i18n.t("community_not_logged_in_alert", {
-                  community: name,
-                  instance: hostname(actor_id),
-                })}
+                <T
+                  i18nKey="community_not_logged_in_alert"
+                  interpolation={{
+                    community: name,
+                    instance: hostname(actor_id),
+                  }}
+                >
+                  #<code className="user-select-all">#</code>#
+                </T>
               </div>
             )}
           </div>