Add community name to featured post action in Modlog (#1891)
authorKlemen Košir <klemen.kosir@kream.io>
Mon, 10 Jul 2023 14:48:27 +0000 (23:48 +0900)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 14:48:27 +0000 (10:48 -0400)
src/shared/components/modlog.tsx

index 5b47f92493ede3ea7a299cb00b1c633a755329b5..ca1cb3326b2cfef3a2ca454d00d071d454e72abc 100644 (file)
@@ -312,6 +312,7 @@ function renderModlogType({ type_, view }: ModlogType) {
       const {
         mod_feature_post: { featured, is_featured_community },
         post: { id, name },
+        community,
       } = view as ModFeaturePostView;
 
       return (
@@ -320,7 +321,12 @@ function renderModlogType({ type_, view }: ModlogType) {
           <span>
             Post <Link to={`/post/${id}`}>{name}</Link>
           </span>
-          <span>{is_featured_community ? " In Community" : " In Local"}</span>
+          <span>
+            {is_featured_community
+              ? " in community "
+              : " in Local, from community "}
+          </span>
+          <CommunityLink community={community} />
         </>
       );
     }
@@ -532,7 +538,7 @@ function renderModlogType({ type_, view }: ModlogType) {
 
       return (
         <>
-          <span>Purged a Post from from </span>
+          <span>Purged a Post from </span>
           <CommunityLink community={community} />
           {reason && (
             <span>