Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modified rendering news list #1005

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/components/dapp-staking/my-staking/components/NewsArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,16 @@ export default defineComponent({
if (result.value) {
// Currently only one tag can be displayed on UI, so let's pick the first one
// link property is missing from SubSocial data.
items.value = result.value.posts.map((x: Data) => {
return {
tag: x.tag.split(',')[0],
title: x.title,
link: x.link,
img: 'https://ipfs.subsocial.network/ipfs/' + x.img,
};
});
items.value = result.value.posts
.map((x: Data) => {
return {
tag: x.tag && x.tag.includes(',') ? x.tag.split(',')[0] : x.tag,
title: x.title,
link: x.link,
img: 'https://ipfs.subsocial.network/ipfs/' + x.img,
};
})
.filter((x: Data) => x.tag !== null);
setDataArray();
handlePageUpdate();
}
Expand Down
Loading