-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
61 lines (56 loc) · 1.59 KB
/
index.js
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
/* eslint-disable filenames/match-exported */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Route,
Switch,
} from 'react-router-dom';
import { OrganizationIntegration } from './src/OrganizationIntegration';
import { Organizations as Organization } from './src/Organizations';
import { ContactsContainer } from './src/contacts';
import { InterfaceContainer } from './src/interfaces';
import Settings from './src/Settings';
class Organizations extends Component {
static propTypes = {
stripes: PropTypes.shape({
connect: PropTypes.func.isRequired,
}).isRequired,
location: PropTypes.object.isRequired,
match: PropTypes.object.isRequired,
showSettings: PropTypes.bool,
}
render() {
if (this.props.showSettings) {
return <Settings {...this.props} />;
}
return (
<Switch>
<Route
component={ContactsContainer}
path={[
'/organizations/contacts/',
'/organizations/privileged-contacts/',
'/organizations/:orgId/contacts/',
'/organizations/:orgId/privileged-contacts/',
]}
/>
<Route
component={InterfaceContainer}
path={[
'/organizations/interface/',
'/organizations/:orgId/interface/',
]}
/>
<Route
path="/organizations/:orgId/integration/"
component={OrganizationIntegration}
/>
<Route
path="/organizations"
component={Organization}
/>
</Switch>
);
}
}
export default Organizations;