mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
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
1 changed files with 4 additions and 1 deletions
|
@ -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