From cac774a0c1abd2bf8f93e2bd06c13c9a5ff50513 Mon Sep 17 00:00:00 2001 From: reya <123083837+reyamir@users.noreply.github.com> Date: Sun, 19 May 2024 08:48:29 +0700 Subject: [PATCH] feat: small ui improve --- apps/desktop2/src/components/note/child.tsx | 19 +++++++++++++++++-- .../src/components/note/mentions/note.tsx | 7 ++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/apps/desktop2/src/components/note/child.tsx b/apps/desktop2/src/components/note/child.tsx index 6f43f5e8..7660d109 100644 --- a/apps/desktop2/src/components/note/child.tsx +++ b/apps/desktop2/src/components/note/child.tsx @@ -1,6 +1,7 @@ import { useEvent } from "@lume/ark"; import { cn } from "@lume/utils"; import { Note } from "."; +import { InfoIcon } from "@lume/icons"; export function NoteChild({ eventId, @@ -12,11 +13,25 @@ export function NoteChild({ const { isLoading, isError, data } = useEvent(eventId); if (isLoading) { - return
Loading...
; + return ( +
+
+
+
+ ); } if (isError || !data) { - return
Error
; + return ( +
+
+ +
+

+ Event not found with your current relay set +

+
+ ); } return ( diff --git a/apps/desktop2/src/components/note/mentions/note.tsx b/apps/desktop2/src/components/note/mentions/note.tsx index 161e6e0c..632cb6ef 100644 --- a/apps/desktop2/src/components/note/mentions/note.tsx +++ b/apps/desktop2/src/components/note/mentions/note.tsx @@ -4,6 +4,7 @@ import { useRouteContext } from "@tanstack/react-router"; import { useTranslation } from "react-i18next"; import { cn } from "@lume/utils"; import { User } from "@/components/user"; +import { Spinner } from "@lume/ui"; export function MentionNote({ eventId, @@ -18,15 +19,15 @@ export function MentionNote({ if (isLoading) { return ( -
-

Loading...

+
+
); } if (isError || !data) { return ( -
+
{t("note.error")}
);