ublo-lib 1.30.2 → 1.30.3
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.
|
@@ -11,7 +11,7 @@ export default function useAccount({
|
|
|
11
11
|
} = useUbloContext();
|
|
12
12
|
const widgetLang = React.useMemo(() => lang === "fr" ? "fr" : "en", [lang]);
|
|
13
13
|
React.useEffect(() => {
|
|
14
|
-
const
|
|
14
|
+
const startAccount = async () => {
|
|
15
15
|
await loadWigetMseM(integration);
|
|
16
16
|
window.MseM.onLoad(() => {
|
|
17
17
|
window.MseM.customerAccount({
|
|
@@ -22,7 +22,7 @@ export default function useAccount({
|
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
startAccount();
|
|
26
26
|
}, [channel, integration, widgetLang]);
|
|
27
27
|
}
|
|
28
28
|
async function loadWigetMseM(integration) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
2
3
|
import Link from "ublo/link";
|
|
3
4
|
import Button from "dt-design-system/es/button";
|
|
4
5
|
import * as Icons from "dt-design-system/es/icons";
|
|
@@ -7,6 +8,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export default function AccountButton({
|
|
9
10
|
item,
|
|
11
|
+
className,
|
|
10
12
|
showLabel,
|
|
11
13
|
compact
|
|
12
14
|
}) {
|
|
@@ -16,11 +18,14 @@ export default function AccountButton({
|
|
|
16
18
|
shortTitle,
|
|
17
19
|
title
|
|
18
20
|
} = item;
|
|
21
|
+
const classes = classNames(styles.button, className, {
|
|
22
|
+
[styles.compact]: compact
|
|
23
|
+
});
|
|
19
24
|
return _jsxs(Button, {
|
|
20
25
|
href: path,
|
|
21
26
|
tag: Link,
|
|
22
27
|
variant: "transparent",
|
|
23
|
-
className:
|
|
28
|
+
className: classes,
|
|
24
29
|
"aria-label": shortTitle || title,
|
|
25
30
|
compact: compact,
|
|
26
31
|
children: [_jsx(Icons.User, {
|