fix: always inject FYP
This commit is contained in:
parent
09fc18cc02
commit
79aa098484
1 changed files with 14 additions and 1 deletions
|
@ -94,7 +94,20 @@ function HomePage(props: Props) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
sortedRowData = rowData;
|
rowData.forEach((key) => {
|
||||||
|
// always inject FYP is homepage not customized, hide news.
|
||||||
|
if (key.id === 'FOLLOWING') {
|
||||||
|
sortedRowData.push(key);
|
||||||
|
sortedRowData.push({
|
||||||
|
id: 'FYP',
|
||||||
|
title: 'Recommended',
|
||||||
|
icon: ICONS.GLOBE,
|
||||||
|
link: `/$/${PAGES.FYP}`,
|
||||||
|
});
|
||||||
|
} else if (key.id !== 'NEWS') {
|
||||||
|
sortedRowData.push(key);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
type SectionHeaderProps = {
|
type SectionHeaderProps = {
|
||||||
|
|
Loading…
Reference in a new issue