From cb72180f9728991a8f0b1937ef43735d96dee87e Mon Sep 17 00:00:00 2001 From: Jay Sitter <jay@jaysitter.com> Date: Fri, 16 Jun 2023 20:54:13 -0400 Subject: [PATCH] fix: Fix broken link --- src/shared/components/common/badges.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/components/common/badges.tsx b/src/shared/components/common/badges.tsx index 4427895..2024ad2 100644 --- a/src/shared/components/common/badges.tsx +++ b/src/shared/components/common/badges.tsx @@ -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> -- 2.44.1