mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Filter links by type
This commit is contained in:
parent
72842c663a
commit
58d36d2403
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ function Trending({ columnMode, ...props }) {
|
|||
|
||||
// Get links
|
||||
try {
|
||||
const { value: links } = await fetchLinks(masto);
|
||||
const { value } = await fetchLinks(masto);
|
||||
// 4 types available: link, photo, video, rich
|
||||
// Only want links for now
|
||||
const links = value?.filter?.((link) => link.type === 'link');
|
||||
console.log('links', links);
|
||||
if (links?.length) {
|
||||
setLinks(links);
|
||||
|
|
Loading…
Reference in a new issue