add follow/unfollow function
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { usePublish } from "@libs/ndk";
|
||||
import { Button } from "@shared/button";
|
||||
import { Image } from "@shared/image";
|
||||
import { DEFAULT_AVATAR } from "@stores/constants";
|
||||
import { DEFAULT_AVATAR, FULL_RELAYS } from "@stores/constants";
|
||||
import { useAccount } from "@utils/hooks/useAccount";
|
||||
import { useProfile } from "@utils/hooks/useProfile";
|
||||
import { useState } from "react";
|
||||
|
||||
export function NoteReplyForm({ id }: { id: string }) {
|
||||
export function NoteReplyForm({ rootID }: { rootID: string }) {
|
||||
const publish = usePublish();
|
||||
|
||||
const { account } = useAccount();
|
||||
@@ -15,7 +15,7 @@ export function NoteReplyForm({ id }: { id: string }) {
|
||||
const [value, setValue] = useState("");
|
||||
|
||||
const submit = () => {
|
||||
const tags = [["e", id]];
|
||||
const tags = [["e", rootID, FULL_RELAYS[0], "root"]];
|
||||
|
||||
// publish event
|
||||
publish({ content: value, kind: 1, tags });
|
||||
|
||||
@@ -33,7 +33,7 @@ export function User({
|
||||
}`}
|
||||
>
|
||||
<Popover.Button
|
||||
className={`${avatarWidth} ${avatarHeight} relative z-10 bg-zinc-900 shrink-0 overflow-hidden`}
|
||||
className={`${avatarWidth} ${avatarHeight} relative z-50 bg-zinc-900 shrink-0 overflow-hidden`}
|
||||
>
|
||||
<Image
|
||||
src={user?.image}
|
||||
|
||||
Reference in New Issue
Block a user