Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
561 geraldo 1
import React from "react";
2
import CardTest from "./card-test/CardTest";
3
import Spinner from "../../../shared/loading-spinner/Spinner";
4
 
5
const List = (props) => {
6
 
7
    // get props
8
    const { backendVars, data, loading, getTestByUrl } = props;
9
 
10
 
11
    return (
12
        <div className="companies-list">
13
            {loading ? (
14
                <div className="row">
15
                    <Spinner />
16
                </div>
17
            ) : (
18
                <div className="row">
19
                    {data.length <= 0 ? (
20
                        <div className="col-md-12 col-sm-12 col-xs-12 text-center">
21
                            {backendVars.LBL_DATATABLE_SZERORECORDS}
22
                        </div>
23
                    ) : (
24
                        <div className="col-md-12 col-sm-12 col-xs-12">
25
                            <div className="row">
26
                                {data.map((test, key) => {
27
                                    return <CardTest
28
                                        key={key}
29
                                        test={test}
30
                                        getTestByUrl={getTestByUrl}
31
                                        backendVars={backendVars} />
32
                                })}
33
                            </div>
34
                        </div>
35
                    )}
36
                </div>
37
            )}
38
 
39
        </div>
40
 
41
    );
42
};
43
 
44
export default List;