Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
reyamir committed Nov 1, 2024
1 parent d37e2a3 commit 6ad8ffd
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
8 changes: 5 additions & 3 deletions src/components/repost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ export const RepostNote = memo(function RepostNote({
{isLoading ? (
<div className="flex items-center justify-center h-20 gap-2">
<Spinner />
<span className="text-sm font-medium text-neutral-700 dark:text-neutral-300">
<p className="text-sm font-medium text-neutral-700 dark:text-neutral-300">
Loading event...
</span>
</p>
</div>
) : isError || !data ? (
<div className="flex items-center justify-center h-20">
Event not found within your current relay set
<p className="text-sm">
Repost event not found within your current relay set
</p>
</div>
) : (
<Note.Provider event={data}>
Expand Down
15 changes: 10 additions & 5 deletions src/routes/columns/_layout/discover-interests.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,22 @@ function Screen() {
<ScrollArea.Viewport ref={ref} className="relative h-full px-3 pb-3">
<Virtualizer scrollRef={ref as unknown as RefObject<HTMLElement>}>
{isLoading ? (
<div className="inline-flex items-center gap-1.5">
<Spinner className="size-4" />
Loading...
<div className="flex items-center justify-center h-20 gap-2">
<Spinner />
<p className="text-sm font-medium text-neutral-700 dark:text-neutral-300">
Loading event...
</p>
</div>
) : isError ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">{error?.message ?? "Error"}</p>
<p className="text-sm text-center">{error?.message ?? "Error"}</p>
</div>
) : !data?.length ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">Empty.</p>
<p className="text-sm text-center">
Nothing to show yet, you can use Lume more and comeback lack to
see new events.
</p>
</div>
) : (
data?.map((item) => renderItem(item))
Expand Down
15 changes: 10 additions & 5 deletions src/routes/columns/_layout/discover-newsfeeds.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,22 @@ function Screen() {
<ScrollArea.Viewport ref={ref} className="relative h-full px-3 pb-3">
<Virtualizer scrollRef={ref as unknown as RefObject<HTMLElement>}>
{isLoading ? (
<div className="inline-flex items-center gap-1.5">
<Spinner className="size-4" />
Loading...
<div className="flex items-center justify-center h-20 gap-2">
<Spinner />
<p className="text-sm font-medium text-neutral-700 dark:text-neutral-300">
Loading event...
</p>
</div>
) : isError ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">{error?.message ?? "Error"}</p>
<p className="text-sm text-center">{error?.message ?? "Error"}</p>
</div>
) : !data?.length ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">Empty.</p>
<p className="text-sm text-center">
Nothing to show yet, you can use Lume more and comeback lack to
see new events.
</p>
</div>
) : (
data?.map((item) => renderItem(item))
Expand Down
15 changes: 10 additions & 5 deletions src/routes/columns/_layout/discover-relays.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,22 @@ function Screen() {
<ScrollArea.Viewport ref={ref} className="relative h-full px-3 pb-3">
<Virtualizer scrollRef={ref as unknown as RefObject<HTMLElement>}>
{isLoading ? (
<div className="inline-flex items-center gap-1.5">
<Spinner className="size-4" />
Loading...
<div className="flex items-center justify-center h-20 gap-2">
<Spinner />
<p className="text-sm font-medium text-neutral-700 dark:text-neutral-300">
Loading event...
</p>
</div>
) : isError ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">{error?.message ?? "Error"}</p>
<p className="text-sm text-center">{error?.message ?? "Error"}</p>
</div>
) : !data?.length ? (
<div className="mb-3 flex flex-col items-center justify-center h-16 w-full rounded-xl overflow-hidden bg-neutral-200/50 dark:bg-neutral-800/50">
<p className="text-center">Empty.</p>
<p className="text-sm text-center">
Nothing to show yet, you can use Lume more and comeback lack to
see new events.
</p>
</div>
) : (
data?.map((item) => renderItem(item))
Expand Down

0 comments on commit 6ad8ffd

Please sign in to comment.