feat: nip05 on profile page #21
23
src/element/Nip05.css
Normal file
@ -0,0 +1,23 @@
|
||||
.nip05 {
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
margin: .2em 0;
|
||||
}
|
||||
|
||||
.nip05 .nick {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.nip05 .domain {
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
.nip05 .badge {
|
||||
margin-left: .2em;
|
||||
}
|
||||
|
||||
.nip05 .error {
|
||||
margin-top: .2em;
|
||||
margin-left: .2em;
|
||||
}
|
59
src/element/Nip05.js
Normal file
@ -0,0 +1,59 @@
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
import { faCheck, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
import './Nip05.css'
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const Nip05 = ({ nip05, pubkey }) => {
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const [nip05pubkey, setNip05pubkey] = useState()
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const [couldNotVerify, setCouldNotVerify] = useState(false)
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const isVerified = nip05pubkey === pubkey
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const [name, domain] = nip05.split('@')
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
const isDefaultUser = name === '_'
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
useEffect(() => {
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
setCouldNotVerify(false)
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
fetch(`https://${domain}/.well-known/nostr.json?name=${name}`)
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
.then((res) => res.json())
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
.then(({ names }) => {
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
if (names && names[name]) {
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
setNip05pubkey(names[name])
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
})
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
.catch((err) => {
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
setCouldNotVerify(true)
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
console.error("Couldn't verifiy nip05")
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
})
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
}, [nip05, name, domain])
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
return (
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<div className="flex nip05">
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
{!isDefaultUser && <div className="nick">{name}</div>}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<div className="domain">
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
{!isDefaultUser && '@'}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
{domain}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
</div>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
{isVerified && (
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
If its not verified then we should show error right? If its not verified then we should show error right?
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
<img width="282" alt="Screenshot 2023-01-10 at 07 19 08" src="https://user-images.githubusercontent.com/92299987/211476232-a81fca20-7a0b-4774-b914-8e449a3522c5.png">
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<span className="badge">
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<FontAwesomeIcon
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
color={"green"}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
icon={faCheck}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
size="xs"
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
/>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
</span>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
)}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
{couldNotVerify && (
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<span className="error">
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
<FontAwesomeIcon
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
color={"red"}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
icon={faTriangleExclamation}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
size="xs"
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
/>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
</span>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
)}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
</div>
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
)
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
}
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
||||
export default Nip05
|
||||
You should include the param You should include the param `?name=${nick}` some services will require this
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done. Good point, done.
Also treating Also treating `_` as the default user and following spec recommendation for display:
<img width="282" alt="Screenshot 2023-01-10 at 07 18 49" src="https://user-images.githubusercontent.com/92299987/211476434-d9eae9e0-aa52-423a-8d78-26217bcfdaa2.png">
<img width="282" alt="Screenshot 2023-01-10 at 07 18 44" src="https://user-images.githubusercontent.com/92299987/211476475-79e03d9d-4224-4ddf-8c63-62e2e75e11ef.png">
|
@ -13,6 +13,7 @@ import { extractLnAddress, parseId } from "../Util";
|
||||
import Timeline from "../element/Timeline";
|
||||
import { extractLinks } from '../Text'
|
||||
import LNURLTip from "../element/LNURLTip";
|
||||
import Nip05 from "../element/Nip05";
|
||||
import Copy from "../element/Copy";
|
||||
|
||||
export default function ProfilePage() {
|
||||
@ -30,13 +31,14 @@ export default function ProfilePage() {
|
||||
<>
|
||||
<div className="flex name">
|
||||
<div className="f-grow">
|
||||
<h2>{user?.name}</h2>
|
||||
<h2>{user?.display_name || user?.name}</h2>
|
||||
<Copy text={params.id} />
|
||||
</div>
|
||||
<div>
|
||||
{isMe ? <div className="btn" onClick={() => navigate("/settings")}>Settings</div> : <FollowButton pubkey={id} />}
|
||||
</div>
|
||||
</div>
|
||||
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
|
||||
<p>{extractLinks([user?.about])}</p>
|
||||
{user?.website ? <a href={user?.website} target="_blank" rel="noreferrer">{user?.website}</a> : null}
|
||||
|
||||
|
You should include the param
?name=${nick}
some services will require thisYou should include the param
?name=${nick}
some services will require thishttps://github.com/nostr-protocol/nips/blob/master/05.md
https://github.com/nostr-protocol/nips/blob/master/05.md
Good point, done.
Good point, done.
Also treating
_
as the default user and following spec recommendation for display:Also treating
_
as the default user and following spec recommendation for display: