import "./NoteToSelf.css"; import { Link, useNavigate } from "react-router-dom"; import { FormattedMessage } from "react-intl"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faBook, faCertificate } from "@fortawesome/free-solid-svg-icons"; import { profileLink } from "Util"; import messages from "./messages"; export interface NoteToSelfProps { pubkey: string; clickable?: boolean; className?: string; link?: string; } function NoteLabel() { return (
); } export default function NoteToSelf({ pubkey, clickable, className, link }: NoteToSelfProps) { const navigate = useNavigate(); const clickLink = () => { if (clickable) { navigate(link ?? profileLink(pubkey)); } }; return (
{(clickable && ( )) || }
); }