This commit is contained in:
2024-02-22 14:01:29 +07:00
parent e9ce932646
commit 64286aa354
34 changed files with 899 additions and 354 deletions

View File

@@ -98,8 +98,7 @@ export class Ark {
.split("'")[0]
.split(".")[0];
const cmd: string = await invoke("get_event", { id: eventId });
const event = JSON.parse(cmd) as Event;
const event: Event = JSON.parse(cmd);
return event;
} catch (e) {
return null;

View File

@@ -6,7 +6,7 @@ export function useProfile(pubkey: string) {
const {
isLoading,
isError,
data: user,
data: profile,
} = useQuery({
queryKey: ["user", pubkey],
queryFn: async () => {
@@ -24,5 +24,5 @@ export function useProfile(pubkey: string) {
retry: 2,
});
return { isLoading, isError, user };
return { isLoading, isError, profile };
}