mirror of
https://github.com/luminous-devs/lume.git
synced 2024-09-19 19:46:34 +00:00
disabled global newsfeed and reply, reaction count
This commit is contained in:
parent
09c7ccc023
commit
b4424e7c35
@ -19,6 +19,7 @@ export default function Reaction({ eventID, eventPubkey }: { eventID: string; ev
|
|||||||
const pubkey = currentUser.pubkey;
|
const pubkey = currentUser.pubkey;
|
||||||
const privkey = currentUser.privkey;
|
const privkey = currentUser.privkey;
|
||||||
|
|
||||||
|
/*
|
||||||
relayPool.subscribe(
|
relayPool.subscribe(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -31,7 +32,7 @@ export default function Reaction({ eventID, eventPubkey }: { eventID: string; ev
|
|||||||
relays,
|
relays,
|
||||||
(event: any) => {
|
(event: any) => {
|
||||||
if (event.content === '🤙' || event.content === '+') {
|
if (event.content === '🤙' || event.content === '+') {
|
||||||
//setReaction(reaction + 1);
|
setReaction(reaction + 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
undefined,
|
undefined,
|
||||||
@ -39,6 +40,7 @@ export default function Reaction({ eventID, eventPubkey }: { eventID: string; ev
|
|||||||
console.log(events, relayURL);
|
console.log(events, relayURL);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
const handleReaction = (e: any) => {
|
const handleReaction = (e: any) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
import { ChatBubbleIcon } from '@radix-ui/react-icons';
|
import { ChatBubbleIcon } from '@radix-ui/react-icons';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
export default function Reply({ eventID }: { eventID: string }) {
|
export default function Reply() {
|
||||||
console.log(eventID);
|
|
||||||
const [count] = useState(0);
|
const [count] = useState(0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,50 +1,18 @@
|
|||||||
import BaseLayout from '@layouts/baseLayout';
|
import BaseLayout from '@layouts/baseLayout';
|
||||||
import NewsFeedLayout from '@layouts/newsfeedLayout';
|
import NewsFeedLayout from '@layouts/newsfeedLayout';
|
||||||
|
|
||||||
import { Placeholder } from '@components/note/placeholder';
|
import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal } from 'react';
|
||||||
import { Thread } from '@components/thread';
|
|
||||||
|
|
||||||
import { hoursAgo } from '@utils/getDate';
|
|
||||||
|
|
||||||
import { dateToUnix, useNostrEvents } from 'nostr-react';
|
|
||||||
import {
|
|
||||||
JSXElementConstructor,
|
|
||||||
ReactElement,
|
|
||||||
ReactFragment,
|
|
||||||
ReactPortal,
|
|
||||||
Suspense,
|
|
||||||
useRef,
|
|
||||||
} from 'react';
|
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const now = useRef(new Date());
|
|
||||||
|
|
||||||
const { events } = useNostrEvents({
|
|
||||||
filter: {
|
|
||||||
until: dateToUnix(now.current),
|
|
||||||
since: dateToUnix(hoursAgo(1, now.current)),
|
|
||||||
kinds: [1],
|
|
||||||
limit: 10,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full w-full">
|
<div className="h-full w-full">
|
||||||
<Suspense fallback={<Placeholder />}>
|
<p>Global</p>
|
||||||
<Thread data={events} />
|
|
||||||
</Suspense>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Page.getLayout = function getLayout(
|
Page.getLayout = function getLayout(
|
||||||
page:
|
page: string | number | boolean | ReactElement<unknown, string | JSXElementConstructor<unknown>> | ReactFragment | ReactPortal
|
||||||
| string
|
|
||||||
| number
|
|
||||||
| boolean
|
|
||||||
| ReactElement<unknown, string | JSXElementConstructor<unknown>>
|
|
||||||
| ReactFragment
|
|
||||||
| ReactPortal
|
|
||||||
) {
|
) {
|
||||||
return (
|
return (
|
||||||
<BaseLayout>
|
<BaseLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user