From dbb5c10da9b17c5530ce19357d5f286d3a8adb56 Mon Sep 17 00:00:00 2001 From: Anon Date: Mon, 8 Aug 2022 16:41:07 -0500 Subject: [PATCH] Use match --- src/shared/components/modlog.tsx | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/shared/components/modlog.tsx b/src/shared/components/modlog.tsx index e0674f8..a22c20b 100644 --- a/src/shared/components/modlog.tsx +++ b/src/shared/components/modlog.tsx @@ -581,14 +581,19 @@ export class Modlog extends Component { ) : (
- {this.state.communityName.isSome() && ( - - /c/{this.state.communityName}{" "} - - )} + { + this.state.communityName.match({ + some: name => ( + + /c/{name}{" "} + + ), + none: <>, + }) + } {i18n.t("modlog")}
-- 2.44.1