updated thread component
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import BaseLayout from '@layouts/baseLayout';
|
||||
import UserLayout from '@layouts/userLayout';
|
||||
|
||||
import { Placeholder } from '@components/note/placeholder';
|
||||
import { Thread } from '@components/thread';
|
||||
|
||||
import { hoursAgo } from '@utils/getDate';
|
||||
|
||||
import { dateToUnix, useNostrEvents } from 'nostr-react';
|
||||
import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal, useRef } from 'react';
|
||||
import {
|
||||
JSXElementConstructor,
|
||||
ReactElement,
|
||||
ReactFragment,
|
||||
ReactPortal,
|
||||
Suspense,
|
||||
useRef,
|
||||
} from 'react';
|
||||
|
||||
export default function Page() {
|
||||
const now = useRef(new Date());
|
||||
@@ -15,12 +23,15 @@ export default function Page() {
|
||||
filter: {
|
||||
since: dateToUnix(hoursAgo(1, now.current)),
|
||||
kinds: [1],
|
||||
limit: 100,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="h-full w-full overflow-hidden rounded-lg border border-zinc-700 bg-zinc-900 shadow-input">
|
||||
<Thread data={events} />
|
||||
<div className="h-full w-full">
|
||||
<Suspense fallback={<Placeholder />}>
|
||||
<Thread data={events} />
|
||||
</Suspense>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user