diff --git a/packages/app/src/Pages/Profile/ProfilePage.tsx b/packages/app/src/Pages/Profile/ProfilePage.tsx index 4c2b7544..9d8202a5 100644 --- a/packages/app/src/Pages/Profile/ProfilePage.tsx +++ b/packages/app/src/Pages/Profile/ProfilePage.tsx @@ -105,6 +105,17 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) { ) as Tab[]; const horizontalScroll = useHorizontalScroll(); + useEffect(() => { + if ( + user?.nip05 && + user.nip05.endsWith(`@${CONFIG.nip05Domain}`) && + (!("isNostrAddressValid" in user) || user.isNostrAddressValid) + ) { + const [username] = user.nip05.split("@"); + navigate(`/${username}`, { replace: true }); + } + }, [user]); + useEffect(() => { if (!id) { const resolvedId = propId || params.id;