Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 573 Rev 635
Línea 1... Línea 1...
1
import React, { useEffect, useState } from "react";
1
import React, { useEffect, useMemo, useState } from "react";
2
import { axios } from '../../utils';
2
import { axios } from '../../utils';
3
import List from "./list/List";
3
import List from "./list/List";
4
import Test from "./test/Test";
4
import Test from "./test/Test";
5
import Search from "../../shared/search/Search";
5
import Search from "../../shared/search/Search";
6
import Breadcrumbs from "../../shared/breadcrumbs/Breadcrumbs"
6
import Breadcrumbs from "../../shared/breadcrumbs/Breadcrumbs"
Línea 59... Línea 59...
59
     */
59
     */
60
    useEffect(() => {
60
    useEffect(() => {
61
        fetchData();
61
        fetchData();
62
    }, [test]);
62
    }, [test]);
Línea 63... Línea -...
63
 
-
 
64
    return (
63
 
65
        <section className="companies-info">
64
    const Content = useMemo(() => {
66
            {!test ? (
65
        !test ? (
67
                <div className="container">
66
            <div className="container">
68
                    <div className="row">
67
                <div className="row">
69
                        <Breadcrumbs title={backendVars.LBL_SELF_EVALUATION} />
68
                    <Breadcrumbs title={backendVars.LBL_SELF_EVALUATION} />
70
                    </div>
69
                </div>
71
                    <div className="row">
70
                <div className="row">
72
                        <Search handleSearch={handleSearch} backendVars={backendVars} />
-
 
73
                    </div>
-
 
74
                    <div className="row">
-
 
75
                        <List
-
 
76
                            data={data}
-
 
77
                            getTestByUrl={getTestByUrl}
-
 
78
                            backendVars={backendVars}
-
 
79
                            loading={loading}
-
 
80
                        />
-
 
81
                    </div>
71
                    <Search handleSearch={handleSearch} backendVars={backendVars} />
-
 
72
                </div>
82
                </div>
73
                <div className="row">
83
            ) : (
74
                    <List
84
                <div className="container">
75
                        data={data}
85
                    <Test
76
                        getTestByUrl={getTestByUrl}
86
                        backendVars={backendVars}
77
                        backendVars={backendVars}
87
                        loading={loading}
-
 
88
                        setTest={setTest}
-
 
89
                        test={test}
-
 
90
                        action={action}
78
                        loading={loading}
91
                    />
79
                    />
-
 
80
                </div>
-
 
81
            </div>
-
 
82
        ) : (
-
 
83
            <div className="container">
-
 
84
                <Test
-
 
85
                    backendVars={backendVars}
-
 
86
                    loading={loading}
-
 
87
                    setTest={setTest}
-
 
88
                    test={test}
-
 
89
                    action={action}
-
 
90
                />
-
 
91
            </div>
-
 
92
        )
-
 
93
    }, [test]);
-
 
94
    
-
 
95
    return (
-
 
96
        <section className="companies-info">
92
                </div>
97
            <Content
93
            )}
98
            />
Línea 94... Línea 99...
94
        </section>
99
        </section>
95
 
100