added alt feed
This commit is contained in:
parent
d9e1346a8a
commit
0cb461d123
@ -1,11 +1,22 @@
|
||||
import Feed from "@/containers/Feed";
|
||||
import Spinner from "@/components/spinner";
|
||||
export default function ProfileFeed({ pubkey }: { pubkey: string }) {
|
||||
|
||||
export default function ProfileFeed({
|
||||
pubkey,
|
||||
alt,
|
||||
}: {
|
||||
pubkey: string;
|
||||
alt?: string;
|
||||
}) {
|
||||
const authors = [pubkey];
|
||||
if (alt) {
|
||||
authors.push(alt);
|
||||
}
|
||||
return (
|
||||
<div className="center w-full flex-col items-stretch space-y-6 text-primary">
|
||||
<Feed
|
||||
filter={{
|
||||
authors: [pubkey],
|
||||
authors: authors,
|
||||
kinds: [1],
|
||||
}}
|
||||
loader={() => (
|
||||
|
@ -15,6 +15,7 @@ import { useModal } from "@/app/_providers/modal/provider";
|
||||
import useCurrentUser from "@/lib/hooks/useCurrentUser";
|
||||
import { NDKUser } from "@nostr-dev-kit/ndk";
|
||||
import MySubscription from "./_components/MySubscription";
|
||||
import { getTagValues } from "@/lib/nostr/utils";
|
||||
const EditProfileModal = dynamic(
|
||||
() => import("@/components/Modals/EditProfile"),
|
||||
{
|
||||
@ -42,6 +43,7 @@ export default function ProfilePage({
|
||||
const { currentUser, mySubscription, follows } = useCurrentUser();
|
||||
const [activeTab, setActiveTab] = useState("feed");
|
||||
const { type, data } = nip19.decode(npub);
|
||||
const delegate = getTagValues("delegate", mySubscription?.tags ?? []);
|
||||
|
||||
if (type !== "npub") {
|
||||
throw new Error("Invalid list");
|
||||
@ -157,7 +159,11 @@ export default function ProfilePage({
|
||||
setActiveTab={(t) => setActiveTab(t.name)}
|
||||
/>
|
||||
</div>
|
||||
{activeTab === "feed" ? <ProfileFeed pubkey={pubkey} /> : ""}
|
||||
{activeTab === "feed" ? (
|
||||
<ProfileFeed pubkey={pubkey} alt={delegate} />
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{activeTab === "subscriptions" ? <Subscriptions pubkey={pubkey} /> : ""}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,7 +24,6 @@ export default function LiveStreamingSection() {
|
||||
const { events } = useEvents({
|
||||
filter: {
|
||||
kinds: [30311 as NDKKind],
|
||||
// authors: NOTABLE_ACCOUNTS.map((a) => nip19.decode(a).data.toString()),
|
||||
limit: 5,
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user