@pelcro/react-pelcro-js 2.7.0-beta.3 → 2.7.0-beta.4
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/dist/index.cjs.js +2 -3
- package/dist/index.esm.js +2 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -10189,12 +10189,11 @@ const Auth0LoginButton = ({
|
|
|
10189
10189
|
labelClassName = "",
|
|
10190
10190
|
iconClassName = ""
|
|
10191
10191
|
}) => {
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
if (auth0Enabled && !window.auth0) {
|
|
10192
|
+
if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
|
|
10195
10193
|
console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10196
10194
|
}
|
|
10197
10195
|
|
|
10196
|
+
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
|
|
10198
10197
|
const auth0InstanceRef = React__default['default'].useRef(null);
|
|
10199
10198
|
React__default['default'].useEffect(() => {
|
|
10200
10199
|
if (auth0Enabled) {
|
package/dist/index.esm.js
CHANGED
|
@@ -10159,12 +10159,11 @@ const Auth0LoginButton = ({
|
|
|
10159
10159
|
labelClassName = "",
|
|
10160
10160
|
iconClassName = ""
|
|
10161
10161
|
}) => {
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
if (auth0Enabled && !window.auth0) {
|
|
10162
|
+
if (!window.auth0 && window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url) {
|
|
10165
10163
|
console.error("Auth0 sdk script wasn't loaded, you need to load auth0 sdk before rendering the Auth0LoginButton");
|
|
10166
10164
|
}
|
|
10167
10165
|
|
|
10166
|
+
const auth0Enabled = Boolean(window.Pelcro.site.read().auth0_client_id && window.Pelcro.site.read().auth0_base_url && window.auth0);
|
|
10168
10167
|
const auth0InstanceRef = React__default.useRef(null);
|
|
10169
10168
|
React__default.useEffect(() => {
|
|
10170
10169
|
if (auth0Enabled) {
|