mirror of
https://github.com/t4t5/nostr-react.git
synced 2025-03-17 13:31:43 +01:00
Update README
This commit is contained in:
parent
302befe8a1
commit
8dcebd9d12
@ -60,7 +60,7 @@ const GlobalFeed = () => {
|
||||
**Fetching all `text_note` events from a specific user, since the beginning of time:**
|
||||
|
||||
```tsx
|
||||
import { useNostrEvents, dateToUnix } from "nostr-react";
|
||||
import { useNostrEvents } from "nostr-react";
|
||||
|
||||
const ProfileFeed = () => {
|
||||
const { events } = useNostrEvents({
|
||||
@ -86,7 +86,7 @@ const ProfileFeed = () => {
|
||||
**Post a message:**
|
||||
|
||||
```tsx
|
||||
import { useNostr } from "nostr-react";
|
||||
import { useNostr, dateToUnix } from "nostr-react";
|
||||
|
||||
import {
|
||||
type Event as NostrEvent,
|
||||
@ -117,7 +117,7 @@ export default function PostButton() {
|
||||
content: message,
|
||||
kind: 1,
|
||||
tags: [],
|
||||
created_at: Math.floor(Date.now() / 1000),
|
||||
created_at: dateToUnix(),
|
||||
pubkey: getPublicKey(privKey),
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user