From c9fa4252d596f3c3315c16e48767afad5cf29768 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:50:41 +0700 Subject: [PATCH] updated minor styles --- src/assets/icons/Reply.tsx | 5 ++- src/components/accountBar/index.tsx | 2 +- src/components/note/atoms/reaction.tsx | 4 +-- src/components/note/atoms/reply.tsx | 4 +-- src/components/note/placeholder.tsx | 4 +-- src/components/note/single.tsx | 12 +++++-- src/pages/feed/[id].tsx | 47 -------------------------- 7 files changed, 18 insertions(+), 60 deletions(-) delete mode 100644 src/pages/feed/[id].tsx diff --git a/src/assets/icons/Reply.tsx b/src/assets/icons/Reply.tsx index d500bed2..b42487d6 100644 --- a/src/assets/icons/Reply.tsx +++ b/src/assets/icons/Reply.tsx @@ -1,4 +1,4 @@ -export default function ReplyIcon() { +export default function ReplyIcon({ className }: { className: string }) { return ( + className={className}> -
+
handleReaction(e)} className="group flex w-16 items-center gap-1.5 text-sm text-zinc-500"> -
+
{isReact ? ( ) : ( - + )}
{reaction} diff --git a/src/components/note/atoms/reply.tsx b/src/components/note/atoms/reply.tsx index 875a2cd2..c8616de7 100644 --- a/src/components/note/atoms/reply.tsx +++ b/src/components/note/atoms/reply.tsx @@ -14,8 +14,8 @@ export default function Reply({ eventID }: { eventID: string }) { return ( diff --git a/src/components/note/placeholder.tsx b/src/components/note/placeholder.tsx index c72f7171..9769e8ce 100644 --- a/src/components/note/placeholder.tsx +++ b/src/components/note/placeholder.tsx @@ -2,7 +2,7 @@ import { memo } from 'react'; export const Placeholder = memo(function Placeholder() { return ( -
+
@@ -17,7 +17,7 @@ export const Placeholder = memo(function Placeholder() {
-
+
diff --git a/src/components/note/single.tsx b/src/components/note/single.tsx index 21d7286d..770f53e9 100644 --- a/src/components/note/single.tsx +++ b/src/components/note/single.tsx @@ -17,14 +17,20 @@ const DynamicContent = dynamic(() => import('@components/note/content'), { // eslint-disable-next-line @typescript-eslint/no-explicit-any export const Single = memo(function Single({ event }: { event: any }) { + const openThread = () => { + console.log('ok'); + }; + return ( -
+
openThread()} + className="flex h-min min-h-min w-full cursor-pointer select-text flex-col border-b border-zinc-800 py-4 px-6 hover:bg-zinc-800">
-
+
-
+
diff --git a/src/pages/feed/[id].tsx b/src/pages/feed/[id].tsx deleted file mode 100644 index 7f18b937..00000000 --- a/src/pages/feed/[id].tsx +++ /dev/null @@ -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) => ( -

- {event.pubkey} posted: {event.content} -

- ))} - - ); -} - -Page.getLayout = function getLayout( - page: - | string - | number - | boolean - | ReactElement> - | ReactFragment - | ReactPortal -) { - return ( - - {page} - - ); -};