@stokr/components-library 3.0.18 → 3.0.19
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.
|
@@ -91,15 +91,6 @@ const ConfirmModalComponent = ({
|
|
|
91
91
|
}) }) : /* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, flex: true, style: { gap: 16 }, children: [
|
|
92
92
|
showCancel && /* @__PURE__ */ jsx(Button, { outlineBlack: true, minWidth: "120px", onClick: handleCancel, ...cancelButtonProps, children: cancelText }),
|
|
93
93
|
/* @__PURE__ */ jsx(Button, { minWidth: "120px", onClick: () => handleConfirm(true), ...buttonProps, children: confirmText })
|
|
94
|
-
] }),
|
|
95
|
-
message && /* @__PURE__ */ jsx("p", { children: message }),
|
|
96
|
-
content && /* @__PURE__ */ jsx("div", { style: { marginTop: "16px" }, children: content }),
|
|
97
|
-
renderFooter ? /* @__PURE__ */ jsx(ComponentWrapper, { children: renderFooter({
|
|
98
|
-
onConfirm: handleConfirm,
|
|
99
|
-
onCancel: handleCancel
|
|
100
|
-
}) }) : /* @__PURE__ */ jsxs(ComponentWrapper, { noPaddingHorizontal: true, flex: true, style: { gap: 16 }, children: [
|
|
101
|
-
showCancel && /* @__PURE__ */ jsx(Button, { outlineBlack: true, minWidth: "120px", onClick: handleCancel, ...cancelButtonProps, children: cancelText }),
|
|
102
|
-
/* @__PURE__ */ jsx(Button, { minWidth: "120px", onClick: () => handleConfirm(true), ...buttonProps, children: confirmText })
|
|
103
94
|
] })
|
|
104
95
|
] }) }),
|
|
105
96
|
showRedBar && /* @__PURE__ */ jsx(RedBar, { barColor, style: barStyle })
|
|
@@ -280,6 +280,7 @@ class AuthProviderClass extends Component {
|
|
|
280
280
|
logoutUser = async (redirect = false, options = {}) => {
|
|
281
281
|
console.log("🚀 ~ file: AuthContext.js:303 ~ logoutUser ~ redirect:", redirect);
|
|
282
282
|
this.clearCookieExpiryTimer();
|
|
283
|
+
this.clearInactivityTimer();
|
|
283
284
|
try {
|
|
284
285
|
const auth = getFirebaseAuth();
|
|
285
286
|
if (auth) signOut(auth).then(() => {
|
|
@@ -712,30 +713,23 @@ class AuthProviderClass extends Component {
|
|
|
712
713
|
},
|
|
713
714
|
children: [
|
|
714
715
|
children,
|
|
715
|
-
this.state.loggedOutDueToInactivity && !this.props.hideInactivityModal && /* @__PURE__ */ jsx(
|
|
716
|
-
ConfirmModalComponent,
|
|
717
|
-
{
|
|
718
|
-
isOpen: true,
|
|
719
|
-
maxWidth: "600px",
|
|
720
|
-
confirmText: "OK",
|
|
721
|
-
onCancel: this.clearLoggedOutDueToInactivity,
|
|
722
|
-
onConfirm: this.clearLoggedOutDueToInactivity,
|
|
723
|
-
showRedBar: true,
|
|
724
|
-
title: "Session expired",
|
|
725
|
-
content: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { style: { fontSize: 16 }, children: "You have been logged out due to inactivity." }) })
|
|
726
|
-
}
|
|
727
|
-
),
|
|
728
|
-
this.state.loggedOutDueToCookieExpiry && !this.props.hideInactivityModal && /* @__PURE__ */ jsx(
|
|
716
|
+
(this.state.loggedOutDueToInactivity || this.state.loggedOutDueToCookieExpiry) && !this.props.hideInactivityModal && /* @__PURE__ */ jsx(
|
|
729
717
|
ConfirmModalComponent,
|
|
730
718
|
{
|
|
731
719
|
isOpen: true,
|
|
732
720
|
maxWidth: "600px",
|
|
733
721
|
confirmText: "OK",
|
|
734
|
-
onCancel:
|
|
735
|
-
|
|
722
|
+
onCancel: () => {
|
|
723
|
+
this.clearLoggedOutDueToInactivity();
|
|
724
|
+
this.clearLoggedOutDueToCookieExpiry();
|
|
725
|
+
},
|
|
726
|
+
onConfirm: () => {
|
|
727
|
+
this.clearLoggedOutDueToInactivity();
|
|
728
|
+
this.clearLoggedOutDueToCookieExpiry();
|
|
729
|
+
},
|
|
736
730
|
showRedBar: true,
|
|
737
731
|
title: "Session expired",
|
|
738
|
-
content: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { style: { fontSize: 16 }, children: "Your session has expired. Please log in again." }) })
|
|
732
|
+
content: /* @__PURE__ */ jsx(Text, { children: /* @__PURE__ */ jsx("p", { style: { fontSize: 16 }, children: this.state.loggedOutDueToInactivity ? "You have been logged out due to inactivity." : "Your session has expired. Please log in again." }) })
|
|
739
733
|
}
|
|
740
734
|
)
|
|
741
735
|
]
|