diff --git a/app/src/pages/AuthorProfilePage.jsx b/app/src/pages/AuthorProfilePage.jsx new file mode 100644 index 0000000..81b2451 --- /dev/null +++ b/app/src/pages/AuthorProfilePage.jsx @@ -0,0 +1,50 @@ +import { useState, useEffect } from 'react'; +import { TeknavData } from '../../teknav-data.js'; +import { useNav, AuthorAvatar, EmptyState } from '../../teknav-ui.jsx'; +import { ArticleRow } from '../../teknav-articles.jsx'; + +export function AuthorProfilePage({ slug }) { + const { navigate } = useNav(); + const [author, setAuthor] = useState(null); + const [articles, setArticles] = useState([]); + const [loading, setLoading] = useState(true); + + useEffect(() => { + const staticAuthor = TeknavData.authors.find(a => a.slug === slug); + const username = staticAuthor?.username || slug; + navigate(`/profile/@${username}`); + }, [slug]); + + if (loading) return
{author.bio}
+