@open-tender/store 1.1.85 → 1.1.86
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.
|
@@ -17,9 +17,10 @@ var SignInButton = function (_a) {
|
|
|
17
17
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
18
18
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).signInButton;
|
|
19
19
|
var customer = ((0, hooks_1.useAppSelector)(slices_1.selectCustomerIdentified) || {}).customer;
|
|
20
|
+
var account = (0, hooks_1.useAppSelector)(slices_1.selectCustomer).account;
|
|
20
21
|
var customerId = (customer || {}).customer_id;
|
|
21
22
|
var isAccount = pathname.includes('account');
|
|
22
|
-
var shouldFetch = !!(customerId && !
|
|
23
|
+
var shouldFetch = !!(customerId && !account && !isAccount);
|
|
23
24
|
var signIn = function () {
|
|
24
25
|
dispatch((0, slices_1.openModal)({ type: 'SIGN_IN' }));
|
|
25
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
|
-
import { fetchCustomer, openModal, resetCustomer, resetCustomerIdentify, resetMenu, selectCustomerIdentified, selectKioskConfig } from '../slices';
|
|
3
|
+
import { fetchCustomer, openModal, resetCustomer, resetCustomerIdentify, resetMenu, selectCustomer, selectCustomerIdentified, selectKioskConfig } from '../slices';
|
|
4
4
|
var endpoints = [
|
|
5
5
|
'ACCOUNT',
|
|
6
6
|
'DEALS',
|
|
@@ -15,9 +15,10 @@ var SignInButton = function (_a) {
|
|
|
15
15
|
var dispatch = useAppDispatch();
|
|
16
16
|
var config = useAppSelector(selectKioskConfig).signInButton;
|
|
17
17
|
var customer = (useAppSelector(selectCustomerIdentified) || {}).customer;
|
|
18
|
+
var account = useAppSelector(selectCustomer).account;
|
|
18
19
|
var customerId = (customer || {}).customer_id;
|
|
19
20
|
var isAccount = pathname.includes('account');
|
|
20
|
-
var shouldFetch = !!(customerId && !
|
|
21
|
+
var shouldFetch = !!(customerId && !account && !isAccount);
|
|
21
22
|
var signIn = function () {
|
|
22
23
|
dispatch(openModal({ type: 'SIGN_IN' }));
|
|
23
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.86",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|