update thread
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import { getReplies } from "@libs/storage";
|
||||
import { NDKEvent } from "@nostr-dev-kit/ndk";
|
||||
import { EmptyIcon } from "@shared/icons";
|
||||
import { Reply } from "@shared/notes/replies/item";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
export function RepliesList({ parent_id }: { parent_id: string }) {
|
||||
const { data } = useQuery(["replies", parent_id], async () => {
|
||||
const { status, data } = useQuery(["replies", parent_id], async () => {
|
||||
return await getReplies(parent_id);
|
||||
});
|
||||
|
||||
@@ -15,7 +14,7 @@ export function RepliesList({ parent_id }: { parent_id: string }) {
|
||||
<h5 className="text-lg font-semibold text-zinc-300">Replies</h5>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
{!data ? (
|
||||
{status === "loading" ? (
|
||||
<div className="flex gap-2 px-3 py-4">
|
||||
<div className="relative h-9 w-9 shrink animate-pulse rounded-md bg-zinc-800" />
|
||||
<div className="flex w-full flex-1 flex-col justify-center gap-1">
|
||||
|
||||
Reference in New Issue
Block a user