-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathContainers.jsx
More file actions
33 lines (27 loc) · 1.08 KB
/
Containers.jsx
File metadata and controls
33 lines (27 loc) · 1.08 KB
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
import DiscoverComponent from '@/ducks/apps/components/Discover'
import MyApplicationsComponent from '@/ducks/apps/components/MyApplications'
import SidebarCategoriesComponent from '@/ducks/apps/components/SidebarCategories'
import { connect } from 'react-redux'
import { translate } from 'cozy-ui/transpiled/react/providers/I18n'
import { getInstalledApps, getRegistryApps } from './index'
const mapStateToProps = state => ({
apps: getRegistryApps(state),
installedApps: getInstalledApps(state),
isFetching: state.apps.isFetching,
isAppFetching: state.apps.isAppFetching,
isInstalling: state.apps.isInstalling,
isUninstalling: state.apps.isUninstalling,
actionError: state.apps.actionError,
fetchError: state.apps.fetchError
})
export const Discover = translate()(connect(mapStateToProps)(DiscoverComponent))
export const MyApplications = translate()(
connect(mapStateToProps)(MyApplicationsComponent)
)
export const SidebarCategories = connect(
state => ({
apps: getRegistryApps(state),
installedApps: getInstalledApps(state)
}),
null
)(SidebarCategoriesComponent)