blob: 703badf1e2ce612b173788cd26bb230c7025a977 (
plain)
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
|
import React from 'react';
import { createLoadingSelector, createNotificationSelector } from '../services/selectors';
import WithLoader from '../shared/loader.hoc';
import { connect } from "react-redux";
let loadingSelector = createLoadingSelector([
'LOGIN',
'COMMON'
]);
let errorSelector = createNotificationSelector([
'LOGIN',
'COMMON'
]);
const MasterComponent = (props) => {
return (
<>
{props.children}
</>
);
}
const mapStateToProps = state => {
return {
isLoading: loadingSelector(state),
error: errorSelector(state)
};
};
export default connect(mapStateToProps)(
WithLoader(MasterComponent)
);
|