Only allow trending link posts for current instance, not remote instance
For this to work on remote instance, will need to fetch its version and check first
This commit is contained in:
parent
1b3938f3d2
commit
f7024f7723
|
@ -72,6 +72,8 @@ function Trending({ columnMode, ...props }) {
|
|||
// const navigate = useNavigate();
|
||||
const latestItem = useRef();
|
||||
|
||||
const sameCurrentInstance = instance === currentInstance;
|
||||
|
||||
const [hashtags, setHashtags] = useState([]);
|
||||
const [links, setLinks] = useState([]);
|
||||
const trendIterator = useRef();
|
||||
|
@ -137,7 +139,8 @@ function Trending({ columnMode, ...props }) {
|
|||
const [currentLink, setCurrentLink] = useState(null);
|
||||
const hasCurrentLink = !!currentLink;
|
||||
const currentLinkRef = useRef();
|
||||
const supportsTrendingLinkPosts = supports('@mastodon/trending-hashtags');
|
||||
const supportsTrendingLinkPosts =
|
||||
sameCurrentInstance && supports('@mastodon/trending-hashtags');
|
||||
|
||||
useEffect(() => {
|
||||
if (currentLink && currentLinkRef.current) {
|
||||
|
|
Loading…
Reference in a new issue