Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3527 | Rev 3652 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 3527 Rev 3532
Línea 1... Línea 1...
1
import React from 'react';
1
import React from 'react';
2
import { useSelector } from 'react-redux';
-
 
3
import { Box, Typography } from '@mui/material';
-
 
Línea 4... Línea 2...
4
 
2
 
Línea 5... Línea 3...
5
import { useTimeline } from '@microlearning/hooks';
3
import { useTimeline } from '@microlearning/hooks';
6
 
4
 
Línea 7... Línea 5...
7
import { InfinityList } from '@shared/components';
5
import { InfinityList, PageHeader } from '@shared/components';
8
import { DetailTag } from '@microlearning/components';
6
import { DetailTag } from '@microlearning/components';
9
 
-
 
Línea 10... Línea 7...
10
export function TimelinePage() {
7
 
11
  const { items, loading, hasMore, loadMore } = useTimeline();
8
export function TimelinePage() {
12
  const labels = useSelector(({ intl }) => intl.labels);
9
  const { items, loading, hasMore, loadMore } = useTimeline();
13
 
-
 
14
  return (
-
 
15
    <>
-
 
16
      <Typography variant='h2'>Linea de tiempo</Typography>
-
 
17
 
-
 
18
      <Box
-
 
19
        display='flex'
-
 
20
        flexDirection='column'
-
 
21
        gap={1}
-
 
22
        width='100%'
-
 
23
        mt={2}
10
 
24
        maxHeight='60vh'
11
  return (
25
        overflow='auto'
12
    <>
26
      >
13
      <PageHeader title='Linea de tiempo' />
27
        <InfinityList
14
      <InfinityList
28
          items={items}
15
        items={items}
29
          loading={loading}
16
        loading={loading}
30
          emptyMessage={labels.datatable_szerorecords}
17
        emptyMessage='No hay elementos para mostrar'
31
          onEnd={loadMore}
18
        onEnd={loadMore}
32
          hasMore={hasMore}
19
        hasMore={hasMore}
33
          renderItem={({ activity, added_on }, i) => (
-
 
34
            <DetailTag key={i} title={activity} label={added_on} />
20
        renderItem={({ activity, added_on }, i) => (
35
          )}
21
          <DetailTag key={i} title={activity} label={added_on} />
36
        />
22
        )}