diff --git a/src/app/chat/components/messages/item.tsx b/src/app/chat/components/messages/item.tsx
index 2dfc26c4..28486635 100644
--- a/src/app/chat/components/messages/item.tsx
+++ b/src/app/chat/components/messages/item.tsx
@@ -1,12 +1,12 @@
-import { ChatMessageUser } from "@app/chat/components/messages/user";
import { useDecryptMessage } from "@app/chat/hooks/useDecryptMessage";
import { MentionNote } from "@shared/notes/mentions/note";
import { ImagePreview } from "@shared/notes/preview/image";
+import { LinkPreview } from "@shared/notes/preview/link";
import { VideoPreview } from "@shared/notes/preview/video";
+import { User } from "@shared/user";
import { parser } from "@utils/parser";
-import { memo } from "react";
-export const ChatMessageItem = memo(function ChatMessageItem({
+export function ChatMessageItem({
data,
userPubkey,
userPrivkey,
@@ -26,11 +26,11 @@ export const ChatMessageItem = memo(function ChatMessageItem({
return (
-
+
-
- {content.parsed || ""}
-
+
+ {content.parsed}
+
{Array.isArray(content.images) && content.images.length ? (
) : (
@@ -41,6 +41,11 @@ export const ChatMessageItem = memo(function ChatMessageItem({
) : (
<>>
)}
+ {Array.isArray(content.links) && content.links.length ? (
+
+ ) : (
+ <>>
+ )}
{Array.isArray(content.notes) && content.notes.length ? (
content.notes.map((note: string) => (
@@ -52,4 +57,4 @@ export const ChatMessageItem = memo(function ChatMessageItem({
);
-});
+}
diff --git a/src/app/chat/components/messages/user.tsx b/src/app/chat/components/messages/user.tsx
deleted file mode 100644
index db3728c7..00000000
--- a/src/app/chat/components/messages/user.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Image } from "@shared/image";
-import { DEFAULT_AVATAR } from "@stores/constants";
-import { useProfile } from "@utils/hooks/useProfile";
-import { shortenKey } from "@utils/shortenKey";
-import dayjs from "dayjs";
-import relativeTime from "dayjs/plugin/relativeTime";
-
-dayjs.extend(relativeTime);
-
-export function ChatMessageUser({
- pubkey,
- time,
-}: { pubkey: string; time: number }) {
- const { user, isError, isLoading } = useProfile(pubkey);
-
- return (
-
- {isError || isLoading ? (
- <>
-
-
- >
- ) : (
- <>
-
-
-
-
-
-
- {user?.nip05 || user?.name || shortenKey(pubkey)}
-
- ·
-
- {dayjs().to(dayjs.unix(time))}
-
-
-
- >
- )}
-
- );
-}
diff --git a/src/app/chat/components/self.tsx b/src/app/chat/components/self.tsx
index b59e4a71..582b9e09 100644
--- a/src/app/chat/components/self.tsx
+++ b/src/app/chat/components/self.tsx
@@ -26,7 +26,7 @@ export function ChatsListSelfItem({ data }: { data: any }) {
href={`/app/chat?pubkey=${data.pubkey}`}
className={twMerge(
"inline-flex h-9 items-center gap-2.5 rounded-md px-2.5",
- pagePubkey === data.pubkey ? "bg-zinc-900 text-white" : "",
+ pagePubkey === data.pubkey ? "bg-zinc-900 text-zinc-100" : "",
)}
>
diff --git a/src/app/chat/components/sidebar.tsx b/src/app/chat/components/sidebar.tsx
index 7da88311..5c5babfe 100644
--- a/src/app/chat/components/sidebar.tsx
+++ b/src/app/chat/components/sidebar.tsx
@@ -4,7 +4,7 @@ import { useProfile } from "@utils/hooks/useProfile";
import { shortenKey } from "@utils/shortenKey";
export function ChatSidebar({ pubkey }: { pubkey: string }) {
- const { user, isError, isLoading } = useProfile(pubkey);
+ const { user } = useProfile(pubkey);
return (
diff --git a/src/app/index/pages/index.page.tsx b/src/app/index/pages/index.page.tsx
index 64a8fb03..904a1180 100644
--- a/src/app/index/pages/index.page.tsx
+++ b/src/app/index/pages/index.page.tsx
@@ -25,6 +25,6 @@ export function Page() {
}, [fetchAccount, fetchLastLogin, account, lastLogin]);
return (
-
+
);
}
diff --git a/src/app/prefetch/pages/index.page.tsx b/src/app/prefetch/pages/index.page.tsx
index 37b30df4..ca4328f9 100644
--- a/src/app/prefetch/pages/index.page.tsx
+++ b/src/app/prefetch/pages/index.page.tsx
@@ -158,7 +158,7 @@ export function Page() {
}, []);
return (
-
+
-
+
-
+
Here's an interesting fact:
@@ -179,7 +179,7 @@ export function Page() {
@@ -130,7 +130,7 @@ export function AddFeedBlock({ parentState }: { parentState: any }) {
required: true,
})}
spellCheck={false}
- className="relative h-10 w-full rounded-md border border-black/5 px-3 py-2 shadow-input shadow-black/5 !outline-none placeholder:text-zinc-400 dark:bg-zinc-800 dark:text-white dark:shadow-black/10 dark:placeholder:text-zinc-500"
+ className="relative h-10 w-full rounded-md border border-black/5 px-3 py-2 shadow-input shadow-black/5 !outline-none placeholder:text-zinc-400 dark:bg-zinc-800 dark:text-zinc-100 dark:shadow-black/10 dark:placeholder:text-zinc-500"
/>
@@ -138,11 +138,11 @@ export function AddFeedBlock({ parentState }: { parentState: any }) {
@@ -224,11 +224,11 @@ export function AddImageBlock({ parentState }: { parentState: any }) {
-
+
{user?.nip05 || user?.name || (
)}
diff --git a/src/shared/mediaUploader.tsx b/src/shared/mediaUploader.tsx
index 9a6cda2d..49f009a9 100644
--- a/src/shared/mediaUploader.tsx
+++ b/src/shared/mediaUploader.tsx
@@ -64,7 +64,7 @@ export function MediaUploader({ setState }: { setState: any }) {
>
{loading ? (
@@ -56,7 +56,7 @@ export function MultiAccounts() {
diff --git a/src/shared/navigation.tsx b/src/shared/navigation.tsx
index 5c4f4035..33f03603 100644
--- a/src/shared/navigation.tsx
+++ b/src/shared/navigation.tsx
@@ -33,7 +33,7 @@ export function Navigation() {
activeClassName="bg-zinc-900/50"
>
-
+
Spaces
@@ -43,7 +43,11 @@ export function Navigation() {
activeClassName="bg-zinc-900/50"
>
-
+
Trending
diff --git a/src/shared/notes/metadata.tsx b/src/shared/notes/metadata.tsx
index 92e638b1..0cdc1965 100644
--- a/src/shared/notes/metadata.tsx
+++ b/src/shared/notes/metadata.tsx
@@ -82,7 +82,7 @@ export function NoteMetadata({
@@ -94,7 +94,7 @@ export function NoteMetadata({
@@ -106,7 +106,7 @@ export function NoteMetadata({
>
diff --git a/src/shared/notes/metadata/reply.tsx b/src/shared/notes/metadata/reply.tsx
index bd71e901..6deeebf9 100644
--- a/src/shared/notes/metadata/reply.tsx
+++ b/src/shared/notes/metadata/reply.tsx
@@ -29,7 +29,7 @@ export function NoteReply({
height={16}
className="text-zinc-400 group-hover:text-green-400"
/>
-
+
{compactNumber.format(replies)}
diff --git a/src/shared/notes/metadata/repost.tsx b/src/shared/notes/metadata/repost.tsx
index 27d0d96d..6ddd689b 100644
--- a/src/shared/notes/metadata/repost.tsx
+++ b/src/shared/notes/metadata/repost.tsx
@@ -51,7 +51,7 @@ export function NoteRepost({
height={16}
className="text-zinc-400 group-hover:text-blue-400"
/>
-
+
{compactNumber.format(count)}
diff --git a/src/shared/notes/metadata/zap.tsx b/src/shared/notes/metadata/zap.tsx
index 2274cd54..26e5a5ef 100644
--- a/src/shared/notes/metadata/zap.tsx
+++ b/src/shared/notes/metadata/zap.tsx
@@ -12,7 +12,7 @@ export function NoteZap({ zaps }: { zaps: number }) {
height={16}
className="text-zinc-400 group-hover:text-blue-400"
/>
-
+
{compactNumber.format(zaps)}
diff --git a/src/shared/notes/replies/form.tsx b/src/shared/notes/replies/form.tsx
index aeab8537..e16ffba6 100644
--- a/src/shared/notes/replies/form.tsx
+++ b/src/shared/notes/replies/form.tsx
@@ -40,7 +40,7 @@ export function NoteReplyForm({ id }: { id: string }) {
name="content"
onChange={(e) => setValue(e.target.value)}
placeholder="Reply to this thread..."
- className="relative h-20 w-full resize-none rounded-md px-5 py-5 text-base bg-transparent !outline-none placeholder:text-zinc-400 dark:text-white dark:placeholder:text-zinc-500"
+ className="relative h-20 w-full resize-none rounded-md px-5 py-5 text-base bg-transparent !outline-none placeholder:text-zinc-400 dark:text-zinc-100 dark:placeholder:text-zinc-500"
spellCheck={false}
/>
diff --git a/src/shared/user.tsx b/src/shared/user.tsx
index 441adeee..e80605f0 100644
--- a/src/shared/user.tsx
+++ b/src/shared/user.tsx
@@ -32,7 +32,7 @@ export function User({
/>