forked from Kieran/snort
modal vid & img min width, sort follower by distance
This commit is contained in:
parent
8e6d11ffaa
commit
f5e84c3f8a
@ -75,11 +75,11 @@ export function SpotlightMedia(props: SpotlightMediaProps) {
|
||||
autoPlay={true}
|
||||
loop={true}
|
||||
controls={true}
|
||||
className="max-h-screen max-w-full"
|
||||
className="max-h-screen max-w-full min-w-[600px]"
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return <ProxyImg src={image} className="max-h-screen max-w-full" />;
|
||||
return <ProxyImg src={image} className="max-h-screen max-w-full min-w-[600px]" />;
|
||||
}
|
||||
}, [image, isVideo]);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { useMemo } from "react";
|
||||
import { HexKey, EventKind, NoteCollection, RequestBuilder } from "@snort/system";
|
||||
import { HexKey, EventKind, NoteCollection, RequestBuilder, socialGraphInstance } from "@snort/system";
|
||||
import { useRequestBuilder } from "@snort/system-react";
|
||||
|
||||
export default function useFollowersFeed(pubkey?: HexKey) {
|
||||
@ -16,7 +16,9 @@ export default function useFollowersFeed(pubkey?: HexKey) {
|
||||
const contactLists = followersFeed.data?.filter(
|
||||
a => a.kind === EventKind.ContactList && a.tags.some(b => b[0] === "p" && b[1] === pubkey),
|
||||
);
|
||||
return [...new Set(contactLists?.map(a => a.pubkey))];
|
||||
return [...new Set(contactLists?.map(a => a.pubkey))].sort((a, b) => {
|
||||
return socialGraphInstance.getFollowDistance(a) - socialGraphInstance.getFollowDistance(b);
|
||||
});
|
||||
}, [followersFeed, pubkey]);
|
||||
|
||||
return followers;
|
||||
|
Loading…
Reference in New Issue
Block a user