6515 |
stevensc |
1 |
import React, { useEffect } from 'react'
|
|
|
2 |
import { axios } from '../../utils'
|
|
|
3 |
import { useSelector } from 'react-redux'
|
|
|
4 |
|
|
|
5 |
import PeopleYouMayKnow from '../../components/widgets/default/PeopleYouMayKnow'
|
|
|
6 |
import SocialNetworks from '../../components/widgets/default/SocialNetworks'
|
|
|
7 |
import SuggestWidget from '../../components/widgets/default/SuggestWidget'
|
|
|
8 |
import HomeNews from '../../components/widgets/default/HomeNews'
|
|
|
9 |
import DailyPulse from '../../components/widgets/default/DailyPulse'
|
|
|
10 |
|
|
|
11 |
const HomeSection = () => {
|
|
|
12 |
const labels = useSelector(({ intl }) => intl.labels)
|
|
|
13 |
|
|
|
14 |
useEffect(() => {
|
|
|
15 |
axios
|
|
|
16 |
.get('/dashboard', { headers: { 'Content-Type': 'application/json' } })
|
|
|
17 |
.then((response) => console.log(response.data))
|
|
|
18 |
.catch((err) => {
|
|
|
19 |
console.log(`Error: ${err}`)
|
|
|
20 |
throw new Error(err)
|
|
|
21 |
})
|
|
|
22 |
}, [])
|
|
|
23 |
|
|
|
24 |
return (
|
|
|
25 |
<main className="main-section-data container px-0">
|
|
|
26 |
<aside className="main-left-sidebar d-none d-md-flex">
|
|
|
27 |
<SuggestWidget
|
|
|
28 |
url="/helpers/my-groups"
|
|
|
29 |
title={`${labels.MY_GROUPS}:`}
|
|
|
30 |
btnLabelAccept={labels.GROUP_VIEW}
|
|
|
31 |
/>
|
|
|
32 |
<SuggestWidget
|
|
|
33 |
url="/helpers/groups-suggestion"
|
|
|
34 |
title={`${labels.SUGGEST_GROUPS}:`}
|
|
|
35 |
btnLabelAccept={labels.GROUP_VIEW}
|
|
|
36 |
/>
|
|
|
37 |
<SocialNetworks
|
|
|
38 |
moodle={{ name: '', image: '' }}
|
|
|
39 |
microlearning={{
|
|
|
40 |
appStore: '',
|
|
|
41 |
playStore: '',
|
|
|
42 |
}}
|
|
|
43 |
/>
|
|
|
44 |
</aside>
|
|
|
45 |
<section className="feed-section"></section>
|
|
|
46 |
|
|
|
47 |
<aside className="right-sidebar">
|
|
|
48 |
<DailyPulse />
|
|
|
49 |
<PeopleYouMayKnow />
|
|
|
50 |
<HomeNews />
|
|
|
51 |
</aside>
|
|
|
52 |
</main>
|
|
|
53 |
)
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
export default HomeSection
|