Update nip05 buy button to only show if nip05 field is empty

This commit is contained in:
w3irdrobot 2023-02-24 13:22:22 -05:00
parent 9c5e386444
commit b800d9532c
Signed by: w3irdrobot
GPG Key ID: 3E6DBBB622F3155C
1 changed files with 6 additions and 4 deletions

View File

@ -147,10 +147,12 @@ export default function ProfileSettings(props: ProfileSettingsProps) {
</div> </div>
<div> <div>
<input type="text" className="mr10" value={nip05} onChange={e => setNip05(e.target.value)} /> <input type="text" className="mr10" value={nip05} onChange={e => setNip05(e.target.value)} />
<button type="button" onClick={() => navigate("/verification")}> {(nip05 === "") && (
<FontAwesomeIcon icon={faShop} /> <button type="button" onClick={() => navigate("/verification")}>
&nbsp; <FormattedMessage {...messages.Buy} /> <FontAwesomeIcon icon={faShop} />
</button> &nbsp; <FormattedMessage {...messages.Buy} />
</button>
)}
</div> </div>
</div> </div>
<div className="form-group card"> <div className="form-group card">