@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/es/index.mjs CHANGED
@@ -14755,7 +14755,7 @@ const LoginView = ({ dispatch }) => {
14755
14755
  };
14756
14756
  return (React__default.createElement(React__default.Fragment, null,
14757
14757
  React__default.createElement(WidgetHeader, null),
14758
- React__default.createElement(VStack, { w: "full", gap: 10, mt: 2, px: 7, flex: 1 },
14758
+ React__default.createElement(VStack, { w: "full", gap: 10, mt: 2, px: 7 },
14759
14759
  config?.theme.assetUri && React__default.createElement("img", { src: config.theme.assetUri, alt: "Logo", width: 80, height: 80 }),
14760
14760
  React__default.createElement(VStack, { width: "full", maxWidth: '25rem', gap: 4 },
14761
14761
  hasEmailProvider && React__default.createElement(EmailInput, null),
@@ -15694,32 +15694,15 @@ const WalletConnectView = ({ dispatch }) => {
15694
15694
  };
15695
15695
 
15696
15696
  function useMediaQuery(query) {
15697
- const [value, setValue] = useState(() => {
15698
- if (typeof window === 'undefined')
15699
- return false;
15700
- return window.matchMedia(query).matches;
15701
- });
15702
- const timeoutRef = useRef(null);
15697
+ const [value, setValue] = useState(false);
15703
15698
  useEffect(() => {
15704
- if (typeof window === 'undefined')
15705
- return;
15706
15699
  function onChange(event) {
15707
- if (timeoutRef.current) {
15708
- clearTimeout(timeoutRef.current);
15709
- }
15710
- timeoutRef.current = setTimeout(() => {
15711
- setValue(event.matches);
15712
- }, 150);
15700
+ setValue(event.matches);
15713
15701
  }
15714
- const result = window.matchMedia(query);
15702
+ const result = matchMedia(query);
15715
15703
  result.addEventListener('change', onChange);
15716
15704
  setValue(result.matches);
15717
- return () => {
15718
- result.removeEventListener('change', onChange);
15719
- if (timeoutRef.current) {
15720
- clearTimeout(timeoutRef.current);
15721
- }
15722
- };
15705
+ return () => result.removeEventListener('change', onChange);
15723
15706
  }, [query]);
15724
15707
  return value;
15725
15708
  }