@magic-ext/magic-widget 1.0.0-canary.979.21272439387.0 → 1.0.0-canary.979.21272990365.0
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/cjs/index.js +5 -22
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +5 -22
- package/dist/es/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -14775,7 +14775,7 @@ const LoginView = ({ dispatch }) => {
|
|
|
14775
14775
|
};
|
|
14776
14776
|
return (React.createElement(React.Fragment, null,
|
|
14777
14777
|
React.createElement(WidgetHeader, null),
|
|
14778
|
-
React.createElement(VStack, { w: "full", gap: 10, mt: 2, px: 7
|
|
14778
|
+
React.createElement(VStack, { w: "full", gap: 10, mt: 2, px: 7 },
|
|
14779
14779
|
config?.theme.assetUri && React.createElement("img", { src: config.theme.assetUri, alt: "Logo", width: 80, height: 80 }),
|
|
14780
14780
|
React.createElement(VStack, { width: "full", maxWidth: '25rem', gap: 4 },
|
|
14781
14781
|
hasEmailProvider && React.createElement(EmailInput, null),
|
|
@@ -15714,32 +15714,15 @@ const WalletConnectView = ({ dispatch }) => {
|
|
|
15714
15714
|
};
|
|
15715
15715
|
|
|
15716
15716
|
function useMediaQuery(query) {
|
|
15717
|
-
const [value, setValue] = React.useState(
|
|
15718
|
-
if (typeof window === 'undefined')
|
|
15719
|
-
return false;
|
|
15720
|
-
return window.matchMedia(query).matches;
|
|
15721
|
-
});
|
|
15722
|
-
const timeoutRef = React.useRef(null);
|
|
15717
|
+
const [value, setValue] = React.useState(false);
|
|
15723
15718
|
React.useEffect(() => {
|
|
15724
|
-
if (typeof window === 'undefined')
|
|
15725
|
-
return;
|
|
15726
15719
|
function onChange(event) {
|
|
15727
|
-
|
|
15728
|
-
clearTimeout(timeoutRef.current);
|
|
15729
|
-
}
|
|
15730
|
-
timeoutRef.current = setTimeout(() => {
|
|
15731
|
-
setValue(event.matches);
|
|
15732
|
-
}, 150);
|
|
15720
|
+
setValue(event.matches);
|
|
15733
15721
|
}
|
|
15734
|
-
const result =
|
|
15722
|
+
const result = matchMedia(query);
|
|
15735
15723
|
result.addEventListener('change', onChange);
|
|
15736
15724
|
setValue(result.matches);
|
|
15737
|
-
return () =>
|
|
15738
|
-
result.removeEventListener('change', onChange);
|
|
15739
|
-
if (timeoutRef.current) {
|
|
15740
|
-
clearTimeout(timeoutRef.current);
|
|
15741
|
-
}
|
|
15742
|
-
};
|
|
15725
|
+
return () => result.removeEventListener('change', onChange);
|
|
15743
15726
|
}, [query]);
|
|
15744
15727
|
return value;
|
|
15745
15728
|
}
|