mirror of
https://github.com/t4t5/nostr-react.git
synced 2025-03-17 13:31:43 +01:00
Change name to nostr-react
This commit is contained in:
parent
8fb6f3a997
commit
da98f15680
@ -1,5 +1,6 @@
|
||||
<<<<<<< HEAD
|
||||
<p align="center">
|
||||
<img width="623" alt="nostrgg-react" src="https://user-images.githubusercontent.com/2598660/208627685-485c08ef-e154-431b-82bc-fb6ae9bc0e25.png">
|
||||
<b>react-nostr</b>
|
||||
</p>
|
||||
<p align="center">
|
||||
React Hooks for Nostr ✨
|
||||
|
11
package.json
11
package.json
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "@nostrgg/react",
|
||||
"name": "nostr-react",
|
||||
"version": "0.1.2",
|
||||
"license": "MIT",
|
||||
"author": "t4t5 (https://t4t5.xyz)",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/nostrgg-react.esm.js",
|
||||
"module": "dist/nostr-react.esm.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
@ -21,7 +21,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nostrgg/nostrgg-react"
|
||||
"url": "https://github.com/t4t5/nostr-react"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@ -39,11 +39,11 @@
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/nostrgg-react.cjs.production.min.js",
|
||||
"path": "dist/nostr-react.cjs.production.min.js",
|
||||
"limit": "10 KB"
|
||||
},
|
||||
{
|
||||
"path": "dist/nostrgg-react.esm.js",
|
||||
"path": "dist/nostr-react.esm.js",
|
||||
"limit": "10 KB"
|
||||
}
|
||||
],
|
||||
@ -68,7 +68,6 @@
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nostrgg/client": "^0.1.0",
|
||||
"nostr-tools": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -51,14 +51,14 @@ export function NostrProvider({
|
||||
relay.connect()
|
||||
|
||||
relay.on("connect", () => {
|
||||
log(debug, "info", `✅ nostrgg: Connected to ${relayUrl}`)
|
||||
log(debug, "info", `✅ nostr: Connected to ${relayUrl}`)
|
||||
setIsLoading(false)
|
||||
onConnectCallback?.(relay)
|
||||
})
|
||||
|
||||
// Wait for this to be merged: https://github.com/fiatjaf/nostr-tools/pull/69
|
||||
// relay.on("error", () => {
|
||||
// log(debug, "error", `❌ nostrgg: Error connecting to ${relayUrl}!`)
|
||||
// log(debug, "error", `❌ nostr: Error connecting to ${relayUrl}!`)
|
||||
// console.log(`Error connecting to ${relay.url}`)
|
||||
// })
|
||||
})
|
||||
@ -89,7 +89,7 @@ export function useNostrEvents({ filter }: { filter: Filter }) {
|
||||
const sub = relay.sub([filter], {})
|
||||
|
||||
sub.on("event", (event: NostrEvent) => {
|
||||
log(debug, "info", "⬇️ nostrgg: Received event:", event)
|
||||
log(debug, "info", "⬇️ nostr: Received event:", event)
|
||||
setEvents((_events) => {
|
||||
return [event, ..._events]
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user