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