Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { AccountFragment } from "@hey/indexer";
2import { Link } from "react-router";
3import stopEventPropagation from "@/helpers/stopEventPropagation";
4import { NotificationAccountName } from "./Account";
5
6interface AggregatedNotificationTitleProps {
7 firstAccount: AccountFragment;
8 linkToType: string;
9 text: string;
10 type?: string;
11}
12
13const AggregatedNotificationTitle = ({
14 firstAccount,
15 linkToType,
16 text,
17 type
18}: AggregatedNotificationTitleProps) => {
19 return (
20 <div>
21 <NotificationAccountName account={firstAccount} />
22 <span> {text} </span>
23 {type && (
24 <Link
25 className="outline-hidden hover:underline focus:underline"
26 onClick={stopEventPropagation}
27 to={linkToType}
28 >
29 {type.toLowerCase()}
30 </Link>
31 )}
32 </div>
33 );
34};
35
36export default AggregatedNotificationTitle;