Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 4624 Rev 5366
Línea 8... Línea 8...
8
import GroupActions from '../components/GroupActions'
8
import GroupActions from '../components/GroupActions'
9
import GroupInfo from '../components/GroupInfo'
9
import GroupInfo from '../components/GroupInfo'
10
import Members from '../components/Members'
10
import Members from '../components/Members'
Línea 11... Línea 11...
11
 
11
 
12
const View = ({ backendVars }) => {
12
const View = ({ backendVars }) => {
13
    const [actionLinks, setActionLinks] = useState({})
13
  const [actionLinks, setActionLinks] = useState({})
Línea 14... Línea 14...
14
    const dispatch = useDispatch();
14
  const dispatch = useDispatch()
15
 
15
 
16
    const load = () => {
16
  const load = () => {
17
        axios.get('')
17
    axios.get('')
18
            .then(({ data }) => {
18
      .then(({ data }) => {
19
                if (!data.success) {
19
        if (!data.success) {
20
                    return dispatch(addNotification({ style: 'error', msg: data.data }))
20
          return dispatch(addNotification({ style: 'error', msg: data.data }))
21
                }
21
        }
22
                setActionLinks(data.data)
22
        setActionLinks(data.data)
23
            })
23
      })
Línea 24... Línea 24...
24
            .catch(err => console.log('>>: err > ', err))
24
      .catch(err => console.log('>>: err > ', err))
25
    }
25
  }
26
 
26
 
Línea 27... Línea 27...
27
    useEffect(() => {
27
  useEffect(() => {
28
        load()
28
    load()
29
    }, [])
29
  }, [])
30
 
30
 
31
    return (
31
  return (
32
        <main className="w-100">
32
        <main className="w-100">
Línea 45... Línea 45...
45
                    />
45
                    />
46
                </div>
46
                </div>
47
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
47
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
48
                    <GroupActions {...backendVars} actionLinks={actionLinks} />
48
                    <GroupActions {...backendVars} actionLinks={actionLinks} />
49
                    {backendVars.withoutFeeds
49
                    {backendVars.withoutFeeds
50
                        ? <AboutGroup {...backendVars} />
50
                      ? <AboutGroup {...backendVars} />
51
                        : <FeedSection
51
                      : <FeedSection
52
                            routeTimeline={backendVars.routeTimeline}
52
                            routeTimeline={backendVars.routeTimeline}
53
                            backendVars={{
53
                            backendVars={{
54
                                ...backendVars,
54
                              ...backendVars,
55
                                image: `/storage/type/group/code/${backendVars.groupId}/${backendVars.image ? `filename/${backendVars.image}` : ""}`
55
                              image: `/storage/type/group/code/${backendVars.groupId}/${backendVars.image ? `filename/${backendVars.image}` : ''}`
56
                            }}
56
                            }}
57
                        />
57
                        />
58
                    }
58
                    }
59
                </div>
59
                </div>
60
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
60
                <div className="d-flex flex-column" style={{ gap: '.5rem' }}>
61
                    <Members groupId={backendVars.groupId} />
61
                    <Members groupId={backendVars.groupId} />
62
                    {!backendVars.withoutFeeds && <AboutGroup {...backendVars} />}
62
                    {!backendVars.withoutFeeds && <AboutGroup {...backendVars} />}
63
                </div>
63
                </div>
64
            </div>
64
            </div>
65
        </main>
65
        </main>
66
    )
66
  )
67
}
67
}
Línea 68... Línea -...
68
 
-
 
69
export default View
68
 
-
 
69
export default View