feat: translations

This commit is contained in:
Alejandro
2023-02-08 22:10:26 +01:00
committed by GitHub
parent 2b44d3b264
commit 2b29fb0897
54 changed files with 1505 additions and 315 deletions

View File

@ -1,12 +1,13 @@
import "./FollowButton.css";
import { useSelector } from "react-redux";
import { FormattedMessage } from "react-intl";
import useEventPublisher from "Feed/EventPublisher";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faUserMinus, faUserPlus } from "@fortawesome/free-solid-svg-icons";
import { HexKey } from "Nostr";
import { RootState } from "State/Store";
import { parseId } from "Util";
import messages from "./messages";
export interface FollowButtonProps {
pubkey: HexKey;
className?: string;
@ -35,7 +36,11 @@ export default function FollowButton(props: FollowButtonProps) {
className={isFollowing ? `${baseClassname} secondary` : baseClassname}
onClick={() => (isFollowing ? unfollow(pubkey) : follow(pubkey))}
>
{isFollowing ? "Unfollow" : "Follow"}
{isFollowing ? (
<FormattedMessage {...messages.Unfollow} />
) : (
<FormattedMessage {...messages.Follow} />
)}
</button>
);
}