@onehat/ui 0.3.152 → 0.3.154
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.
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import withComponent from '../Hoc/withComponent.js';
|
|
|
7
7
|
const ButtonComponent = function(props) {
|
|
8
8
|
const {
|
|
9
9
|
self,
|
|
10
|
+
text,
|
|
10
11
|
} = props,
|
|
11
12
|
buttonRef = useRef();
|
|
12
13
|
|
|
@@ -14,7 +15,7 @@ const ButtonComponent = function(props) {
|
|
|
14
15
|
self.ref = buttonRef.current;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
return <Button ref={buttonRef} {...props}
|
|
18
|
+
return <Button ref={buttonRef} {...props}>{text}</Button>;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export default withComponent(ButtonComponent);
|
|
@@ -3,10 +3,12 @@ import UiGlobals from '../UiGlobals.js';
|
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
|
|
5
5
|
export default async function getSaved(key) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const Repo = oneHatData.getRepository(UiGlobals.uiSavesRepo);
|
|
7
|
+
if (!Repo) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
9
10
|
|
|
11
|
+
const entity = Repo?.getById(key);
|
|
10
12
|
if (!entity) {
|
|
11
13
|
return null;
|
|
12
14
|
}
|
|
@@ -3,9 +3,12 @@ import UiGlobals from '../UiGlobals.js';
|
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
|
|
5
5
|
export default async function setSaved(key, value) {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const Repo = oneHatData.getRepository(UiGlobals.uiSavesRepo);
|
|
7
|
+
if (!Repo) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const entity = Repo?.getById(key);
|
|
9
12
|
|
|
10
13
|
let isOneBuild = false,
|
|
11
14
|
isJson = false,
|