@frontegg/react-hooks 7.0.0-alpha.5 → 7.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext,
|
|
1
|
+
import React, { createContext, useContext } from 'react';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
export const FronteggStoreContext = /*#__PURE__*/createContext(null);
|
|
4
4
|
|
|
@@ -7,10 +7,10 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
7
7
|
FronteggStoreContext.displayName = 'FronteggStoreContext';
|
|
8
8
|
}
|
|
9
9
|
export const useStore = () => useContext(FronteggStoreContext);
|
|
10
|
-
export const Provider =
|
|
10
|
+
export const Provider = props => {
|
|
11
11
|
return /*#__PURE__*/_jsx(FronteggStoreContext.Provider, {
|
|
12
12
|
value: props.store,
|
|
13
13
|
children: props.children
|
|
14
14
|
});
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
export default FronteggStoreContext;
|
package/index.js
CHANGED
|
@@ -17,12 +17,12 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
17
17
|
}
|
|
18
18
|
const useStore = () => (0, _react.useContext)(FronteggStoreContext);
|
|
19
19
|
exports.useStore = useStore;
|
|
20
|
-
const Provider =
|
|
20
|
+
const Provider = props => {
|
|
21
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FronteggStoreContext.Provider, {
|
|
22
22
|
value: props.store,
|
|
23
23
|
children: props.children
|
|
24
24
|
});
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
exports.Provider = Provider;
|
|
27
27
|
var _default = FronteggStoreContext;
|
|
28
28
|
exports.default = _default;
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/react-hooks",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.7",
|
|
4
4
|
"main": "./node/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Frontegg LTD",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/runtime": "^7.18.6",
|
|
9
|
-
"@frontegg/redux-store": "7.0.0-alpha.
|
|
10
|
-
"@frontegg/types": "7.0.0-alpha.
|
|
9
|
+
"@frontegg/redux-store": "7.0.0-alpha.7",
|
|
10
|
+
"@frontegg/types": "7.0.0-alpha.7",
|
|
11
11
|
"@types/react": "*",
|
|
12
12
|
"get-value": "^3.0.1"
|
|
13
13
|
},
|