on master help sign in
components: wrap event patps in links to id pages
25cc2c6Matilde Park
components/Snippets.js+8−1
@@ -1,3 +1,4 @@
1+import Link from "next/link";
1import {
2import {
2 getAllEvents,
3 getAllEvents,
3 generateDisplayDate,
4 generateDisplayDate,
@@ -12,7 +13,13 @@ export function Name({ children, className }) {
12}
13}
13
14
14export function Patp({ children, className }) {
15export function Patp({ children, className }) {
16+ return (
17+ <Link href={`/ids/${children}`} passHref>
18+ <a>
15− return <code className={`font-mono ${className || ""}`}>{children}</code>;
19+ <code className={`font-mono ${className || ""}`}>{children}</code>
20+ </a>
21+ </Link>
22+ );
16}
23}
17
24
18// Used to render a human name alongside their @p
25// Used to render a human name alongside their @p