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