@thecb/components 3.5.4 → 3.5.6
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
|
@@ -3,8 +3,11 @@ import Spinner from "../spinner";
|
|
|
3
3
|
import { Box, Cover, Center } from "../layouts";
|
|
4
4
|
|
|
5
5
|
const Loading = () => (
|
|
6
|
-
<Box
|
|
7
|
-
|
|
6
|
+
<Box
|
|
7
|
+
key="spinner-container"
|
|
8
|
+
extraStyles={`position: fixed; top: 0; bottom: 0; left: 0; right: 0;`}
|
|
9
|
+
>
|
|
10
|
+
<Cover minHeight="100%" singleChild>
|
|
8
11
|
<Center intrinsic>
|
|
9
12
|
<Box>
|
|
10
13
|
<Spinner size="100" />
|
|
@@ -20,7 +20,11 @@ const PaymentDetailsActions = ({
|
|
|
20
20
|
const [isLoading, setIsLoading] = useState(false);
|
|
21
21
|
const [modalOpen, toggleModal] = useState(false);
|
|
22
22
|
const { obligationSlug } = config;
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
createPaymentFromProfile,
|
|
25
|
+
setDetailedObligation,
|
|
26
|
+
navigateToDetailedObligation
|
|
27
|
+
} = actions;
|
|
24
28
|
const detailsSlug =
|
|
25
29
|
config.type === "ACCOUNT"
|
|
26
30
|
? `/profile/accounts/details/${obligationSlug}`
|
|
@@ -30,7 +34,8 @@ const PaymentDetailsActions = ({
|
|
|
30
34
|
createPaymentFromProfile(obligations, config);
|
|
31
35
|
};
|
|
32
36
|
const handleDetailsClick = () => {
|
|
33
|
-
setDetailedObligation(obligations, config
|
|
37
|
+
setDetailedObligation(obligations, config);
|
|
38
|
+
navigateToDetailedObligation(detailsSlug);
|
|
34
39
|
};
|
|
35
40
|
return (
|
|
36
41
|
<Box
|
|
@@ -105,7 +110,10 @@ const PaymentDetailsActions = ({
|
|
|
105
110
|
<ButtonWithAction
|
|
106
111
|
variant="tertiary"
|
|
107
112
|
text="Set Up Autopay"
|
|
108
|
-
action={
|
|
113
|
+
action={() => {
|
|
114
|
+
setDetailedObligation(obligations, config);
|
|
115
|
+
handleAutopayAction();
|
|
116
|
+
}}
|
|
109
117
|
dataQa="Set Up Autopay"
|
|
110
118
|
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
111
119
|
/>
|