refactor: Simplify Nostr connection management and enhance store integration
- Refactor useNostr composable to utilize a centralized Pinia store for connection state and client management. - Update NostrFeed and App components to leverage the new store-based approach for relay configuration and client instantiation. - Remove direct relay URL handling from components, improving maintainability and consistency across the application.
This commit is contained in:
parent
0324cf8ec5
commit
236a8a59b9
5 changed files with 85 additions and 38 deletions
|
|
@ -10,8 +10,7 @@ import { identity } from '@/composables/useIdentity'
|
|||
import { toast } from 'vue-sonner'
|
||||
import { config } from '@/lib/config'
|
||||
|
||||
const relays = config.nostr.relays
|
||||
const { isConnected, isConnecting, error, connect, disconnect } = useNostr({ relays })
|
||||
const { isConnected, isConnecting, error, connect, disconnect } = useNostr()
|
||||
|
||||
const showPasswordDialog = ref(false)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue