]> Untitled Git - lemmy-ui.git/commitdiff
fix: Fix broken link
authorJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 00:54:13 +0000 (20:54 -0400)
committerJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 00:54:13 +0000 (20:54 -0400)
src/shared/components/common/badges.tsx

index 4427895032a14f1c82c9e72624d3bd5469b12ebf..2024ad2cc17c44c73e103bdb2f33a1dde7568fa1 100644 (file)
@@ -9,7 +9,7 @@ import { numToSI } from "../../utils";
 
 interface BadgesProps {
   counts: CommunityAggregates | SiteAggregates;
-  community_view?: CommunityView;
+  community_view: CommunityView;
 }
 
 const isCommunityAggregates = (
@@ -96,7 +96,9 @@ export const Badges = ({ counts, community_view }: BadgesProps) => {
       <li className="list-inline-item">
         <Link
           className="badge badge-primary"
-          to={`/modlog/${!!community_view ?? community_view?.community.id}`}
+          to={`/modlog${
+            community_view ? `/${community_view.community.id}` : ""
+          }`}
         >
           {i18n.t("modlog")}
         </Link>