updated minor styles

This commit is contained in:
Ren Amamiya
2023-02-21 20:50:41 +07:00
parent 674377c11a
commit c9fa4252d5
7 changed files with 18 additions and 60 deletions

View File

@@ -1,47 +0,0 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import BaseLayout from '@layouts/baseLayout';
import UserLayout from '@layouts/userLayout';
import { useRouter } from 'next/router';
import { useNostrEvents } from 'nostr-react';
import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal } from 'react';
export default function Page() {
const router = useRouter();
const { id }: any = router.query;
const { events } = useNostrEvents({
filter: {
'#e': [id],
since: 0,
kinds: [1],
limit: 20,
},
});
return (
<>
{events.map((event) => (
<p key={event.id}>
{event.pubkey} posted: {event.content}
</p>
))}
</>
);
}
Page.getLayout = function getLayout(
page:
| string
| number
| boolean
| ReactElement<unknown, string | JSXElementConstructor<unknown>>
| ReactFragment
| ReactPortal
) {
return (
<BaseLayout>
<UserLayout>{page}</UserLayout>
</BaseLayout>
);
};