Skip to content

Commit

Permalink
Merge pull request #13 from nosdav/login
Browse files Browse the repository at this point in the history
better login ux
  • Loading branch information
melvincarvalho authored May 11, 2024
2 parents 1671d65 + 41ec8a6 commit 6e48464
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export class App extends Component {
*/
userLogin = async () => {
const userPublicKey = await window.nostr.getPublicKey();
Swal.fire({
title: "Logged in!",
text: "Logged in with public key!",
icon: "success"
});
console.log(`Logged in with public key: ${userPublicKey}`);
await this.setState({ userPublicKey: userPublicKey });
this.loadBookmarks();
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/style.css" />
<title>NosDAV Bookmarks</title>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script type="application/ld+json" id="data">
{
"@id": "#app",
Expand Down

0 comments on commit 6e48464

Please sign in to comment.