Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4513 Rev 4522
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
-
 
2
import React, { useEffect, useState } from 'react'
2
import React from 'react'
3
import { useDispatch } from 'react-redux'
3
import FeedSection from '../../../../../dashboard/templates/linkedin/Feed/FeedSection'
4
import FeedSection from '../../../../../dashboard/templates/linkedin/Feed/FeedSection'
-
 
5
import { addNotification } from '../../../../../redux/notification/notification.actions'
-
 
6
import { axios } from '../../../../../utils'
4
import AboutGroup from '../components/AboutGroup'
7
import AboutGroup from '../components/AboutGroup'
-
 
8
import GroupActions from '../components/GroupActions'
5
import GroupInfo from '../components/GroupInfo'
9
import GroupInfo from '../components/GroupInfo'
6
import Members from '../components/Members'
10
import Members from '../components/Members'
Línea 7... Línea 11...
7
 
11
 
-
 
12
const View = ({ backendVars }) => {
-
 
13
    const [actionLinks, setActionLinks] = useState({})
-
 
14
    const dispatch = useDispatch();
-
 
15
 
-
 
16
    const load = () => {
-
 
17
        axios.get('')
-
 
18
            .then(({ data }) => {
-
 
19
                if (!data.success) {
-
 
20
                    return dispatch(addNotification({ style: 'error', msg: data.data }))
-
 
21
                }
-
 
22
                setActionLinks(data.data)
-
 
23
            })
-
 
24
            .catch(err => console.log('>>: err > ', err))
-
 
25
    }
-
 
26
 
-
 
27
    useEffect(() => {
-
 
28
        load()
-
 
29
    }, [])
8
const View = ({ backendVars }) => {
30
 
9
    return (
31
    return (
10
        <main className="w-100">
32
        <main className="w-100">
11
            <div className="container p-0 app__body layout__content">
33
            <div className="container p-0 app__body layout__content">
12
                <div className="d-flex flex-column">
34
                <div className="d-flex flex-column">
Línea 20... Línea 42...
20
                        groupType={backendVars.groupType}
42
                        groupType={backendVars.groupType}
21
                        accessibility={backendVars.accessibility}
43
                        accessibility={backendVars.accessibility}
22
                    />
44
                    />
23
                </div>
45
                </div>
24
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
46
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
-
 
47
                    <GroupActions {...backendVars} actionLinks={actionLinks} />
25
                    <FeedSection
48
                    <FeedSection
26
                        routeTimeline={backendVars.routeTimeline}
49
                        routeTimeline={backendVars.routeTimeline}
27
                        backendVars={{
50
                        backendVars={{
28
                            ...backendVars,
51
                            ...backendVars,
29
                            image: `/storage/type/group/code/${backendVars.groupId}/${backendVars.image ? `filename/${backendVars.image}` : ""}`
52
                            image: `/storage/type/group/code/${backendVars.groupId}/${backendVars.image ? `filename/${backendVars.image}` : ""}`