mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-28 04:27:35 +02:00
only show people lists under follow button
This commit is contained in:
@@ -17,6 +17,7 @@ import { useCurrentAccount } from "../hooks/use-current-account";
|
|||||||
import { ArrowDownSIcon, FollowIcon, PlusCircleIcon, UnfollowIcon } from "./icons";
|
import { ArrowDownSIcon, FollowIcon, PlusCircleIcon, UnfollowIcon } from "./icons";
|
||||||
import useUserLists from "../hooks/use-user-lists";
|
import useUserLists from "../hooks/use-user-lists";
|
||||||
import {
|
import {
|
||||||
|
PEOPLE_LIST_KIND,
|
||||||
createEmptyContactList,
|
createEmptyContactList,
|
||||||
draftAddPerson,
|
draftAddPerson,
|
||||||
draftRemovePerson,
|
draftRemovePerson,
|
||||||
@@ -40,7 +41,7 @@ function UsersLists({ pubkey }: { pubkey: string }) {
|
|||||||
const [isLoading, setLoading] = useState(false);
|
const [isLoading, setLoading] = useState(false);
|
||||||
const newListModal = useDisclosure();
|
const newListModal = useDisclosure();
|
||||||
|
|
||||||
const lists = useUserLists(account.pubkey);
|
const lists = useUserLists(account.pubkey).filter((list) => list.kind === PEOPLE_LIST_KIND);
|
||||||
|
|
||||||
const inLists = lists.filter((list) => getPubkeysFromList(list).some((p) => p.pubkey === pubkey));
|
const inLists = lists.filter((list) => getPubkeysFromList(list).some((p) => p.pubkey === pubkey));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user