Use match

This commit is contained in:
Anon 2022-08-08 16:41:07 -05:00
parent a8ab4e0558
commit dbb5c10da9

View file

@ -581,14 +581,19 @@ export class Modlog extends Component<any, ModlogState> {
) : (
<div>
<h5>
{this.state.communityName.isSome() && (
{
this.state.communityName.match({
some: name => (
<Link
className="text-body"
to={`/c/${this.state.communityName}`}
to={`/c/${name}`}
>
/c/{this.state.communityName}{" "}
/c/{name}{" "}
</Link>
)}
),
none: <></>,
})
}
<span>{i18n.t("modlog")}</span>
</h5>
<form className="form-inline mr-2">