mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
limited lab updates length at flow and at lab
This commit is contained in:
parent
b1e68a8a6d
commit
44ab426915
2 changed files with 5 additions and 2 deletions
|
@ -49,7 +49,7 @@ const LabStats: FC<IProps> = () => {
|
||||||
<>
|
<>
|
||||||
<div className={styles.title}>Новые</div>
|
<div className={styles.title}>Новые</div>
|
||||||
<Group className={styles.updates}>
|
<Group className={styles.updates}>
|
||||||
{updates.map(node => (
|
{updates.slice(0, 10).map(node => (
|
||||||
<FlowRecentItem node={node} key={node.id} has_new />
|
<FlowRecentItem node={node} key={node.id} has_new />
|
||||||
))}
|
))}
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
@ -53,7 +53,10 @@ const FlowLayout: FC = () => {
|
||||||
[dispatch]
|
[dispatch]
|
||||||
);
|
);
|
||||||
|
|
||||||
const cumulativeUpdates = useMemo(() => [...updated, ...labUpdates], [updated, labUpdates]);
|
const cumulativeUpdates = useMemo(() => [...updated, ...labUpdates].slice(0, 10), [
|
||||||
|
updated,
|
||||||
|
labUpdates,
|
||||||
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.addEventListener('scroll', onLoadMore);
|
window.addEventListener('scroll', onLoadMore);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue