feat: Add support for NIP-51 (#236)

* feat: and follow and interest sets

* feat: improve query

* feat: improve
This commit is contained in:
雨宮蓮
2024-10-07 14:33:20 +07:00
committed by GitHub
parent d841163ba7
commit 090a815f99
37 changed files with 1500 additions and 765 deletions

23
src/routes/set-group.tsx Normal file
View File

@@ -0,0 +1,23 @@
import { commands } from "@/commands.gen";
import { createFileRoute } from "@tanstack/react-router";
type RouteSearch = {
account: string;
};
export const Route = createFileRoute("/set-group")({
validateSearch: (search: Record<string, string>): RouteSearch => {
return {
account: search.account,
};
},
loader: async () => {
const res = await commands.getContactList();
if (res.status === "ok") {
return res.data;
} else {
throw new Error(res.error);
}
},
});