From: Anon Date: Mon, 8 Aug 2022 21:41:07 +0000 (-0500) Subject: Use match X-Git-Url: http://these/git/%7B%60https:/readmes/README.ja.md?a=commitdiff_plain;h=dbb5c10da9b17c5530ce19357d5f286d3a8adb56;p=lemmy-ui.git Use match --- 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")}