-
Notifications
You must be signed in to change notification settings - Fork 12
/
OrgHomeTabs.jsx
67 lines (64 loc) · 1.81 KB
/
OrgHomeTabs.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React from 'react';
import { Tabs, Tab } from '@material-ui/core';
import { get } from 'lodash';
import AboutAccordian from '../common/AboutAccordian';
import OrgHomeChildrenList from './OrgHomeChildrenList';
const OrgHomeTabs = props => {
const {
tab, org, location, url, pins, showPin, onTabChange, onPinCreate, onPinDelete,
} = props;
const about = get(org, 'extras.about')
return (
<div className='col-md-12 sub-tab'>
<Tabs className='sub-tab-header' value={tab} onChange={onTabChange} aria-label="concept-home-tabs" classes={{indicator: 'hidden'}}>
<Tab label="Sources" />
<Tab label="Collections" />
<Tab label="Members" />
<Tab label="About" />
</Tabs>
<div className='sub-tab-container' style={{display: 'flex', minHeight: '500px'}}>
{
tab === 0 &&
<OrgHomeChildrenList
org={org}
location={location}
url={url}
pins={pins}
showPin={showPin}
onPinCreate={onPinCreate}
onPinDelete={onPinDelete}
resource='sources'
/>
}
{
tab === 1 &&
<OrgHomeChildrenList
org={org}
location={location}
url={url}
pins={pins}
showPin={showPin}
onPinCreate={onPinCreate}
onPinDelete={onPinDelete}
resource='collections'
/>
}
{
tab === 2 &&
<OrgHomeChildrenList
org={org}
location={location}
url={url}
resource='users'
urlPath='members'
/>
}
{
tab === 3 &&
<AboutAccordian id={org.id} about={about} />
}
</div>
</div>
);
}
export default OrgHomeTabs;