redirect from /npub to /username
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f048298d47
commit
a5dddcf093
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user