|
@@ -3,18 +3,19 @@ import React, { useState, useEffect } from 'react';
|
3
|
3
|
import UpdateIcon from '@mui/icons-material/Update';
|
4
|
4
|
|
5
|
5
|
import {
|
6
|
|
- Typography, Pagination, Stack, CircularProgress, Box
|
|
6
|
+ Typography, Pagination, Stack,
|
|
7
|
+ // CircularProgress, Box
|
7
|
8
|
} from '@mui/material'
|
8
|
9
|
|
9
|
10
|
import { Row, Col } from 'react-bootstrap';
|
10
|
11
|
|
11
|
|
-import { Candidato } from './Candidato'
|
|
12
|
+import { Candidato, Preview } from './Candidato'
|
12
|
13
|
// const USER_LENGTH = 14
|
13
|
|
-const USER_LENGTH = 99
|
|
14
|
+const USER_LENGTH = 120
|
14
|
15
|
|
15
|
16
|
|
16
|
17
|
function Divide(arregloOriginal){
|
17
|
|
- const LONGITUD_PEDAZOS = 10;
|
|
18
|
+ const LONGITUD_PEDAZOS = 6;
|
18
|
19
|
let arregloDeArreglos = [];
|
19
|
20
|
for (let i = 0; i < arregloOriginal.length; i += LONGITUD_PEDAZOS) {
|
20
|
21
|
let pedazo = arregloOriginal.slice(i, i + LONGITUD_PEDAZOS);
|
|
@@ -39,8 +40,6 @@ export default function Candidatos () {
|
39
|
40
|
useEffect(() => {
|
40
|
41
|
|
41
|
42
|
setTimeout(() => {
|
42
|
|
-
|
43
|
|
-
|
44
|
43
|
let list = [{
|
45
|
44
|
password : 'tester',
|
46
|
45
|
puesto : "Piloto Repartidor",
|
|
@@ -93,14 +92,9 @@ export default function Candidatos () {
|
93
|
92
|
</Row>
|
94
|
93
|
</div>
|
95
|
94
|
{
|
96
|
|
- users.length ?
|
97
|
|
- users[page - 1].map( user => (<Candidato key={user.DPI} user={user}/>))
|
98
|
|
- :
|
99
|
|
- <center>
|
100
|
|
- <Box sx={{ display: 'flex', padding : '5%', maginTop : 100, }}>
|
101
|
|
- <CircularProgress />
|
102
|
|
- </Box>
|
103
|
|
- </center>
|
|
95
|
+ users.length
|
|
96
|
+ ? users[page - 1].map( user => (<Candidato key={user.DPI} user={user}/>))
|
|
97
|
+ : <Preview lenght={10}/>
|
104
|
98
|
}
|
105
|
99
|
<Row style={{ padding : 5 }}>
|
106
|
100
|
<Col>
|