feat: Multi Accounts (#237)
* wip: new sync * wip: restructure routes * update * feat: improve sync * feat: repost with multi-account * feat: improve sync * feat: publish with multi account * fix: settings screen * feat: add zap for multi accounts
This commit is contained in:
@@ -7,7 +7,7 @@ import { message } from "@tauri-apps/plugin-dialog";
|
||||
import { useTransition } from "react";
|
||||
import { useUserContext } from "./provider";
|
||||
|
||||
export function UserFollowButton({ className }: { className?: string }) {
|
||||
export function UserButton({ className }: { className?: string }) {
|
||||
const user = useUserContext();
|
||||
|
||||
const { queryClient } = useRouteContext({ strict: false });
|
||||
@@ -18,7 +18,7 @@ export function UserFollowButton({ className }: { className?: string }) {
|
||||
} = useQuery({
|
||||
queryKey: ["status", user.pubkey],
|
||||
queryFn: async () => {
|
||||
const res = await commands.checkContact(user.pubkey);
|
||||
const res = await commands.isContact(user.pubkey);
|
||||
|
||||
if (res.status === "ok") {
|
||||
return res.data;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { UserAbout } from "./about";
|
||||
import { UserAvatar } from "./avatar";
|
||||
import { UserButton } from "./button";
|
||||
import { UserCover } from "./cover";
|
||||
import { UserFollowButton } from "./followButton";
|
||||
import { UserName } from "./name";
|
||||
import { UserNip05 } from "./nip05";
|
||||
import { UserProvider } from "./provider";
|
||||
@@ -17,5 +17,5 @@ export const User = {
|
||||
NIP05: UserNip05,
|
||||
Time: UserTime,
|
||||
About: UserAbout,
|
||||
Button: UserFollowButton,
|
||||
Button: UserButton,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user