diff --git a/app/src/pages/shared.jsx b/app/src/pages/shared.jsx new file mode 100644 index 0000000..3627b81 --- /dev/null +++ b/app/src/pages/shared.jsx @@ -0,0 +1,32 @@ +import { TeknavData } from '../../teknav-data.js'; + +export function authorProfilePath(author) { + const username = author.username || TeknavData.authors.find(a => a.slug === author.slug)?.username; + return username ? `/profile/@${username}` : `/author/${author.slug}`; +} + +export function LegalPage({ title, subtitle, children }) { + return ( +
+
+
+

{title}

+ {subtitle &&

{subtitle}

} +
+
+
+ {children} +
+
+
+ ); +} + +export function LegalSection({ title, children }) { + return ( +
+

{title}

+ {children} +
+ ); +}