fix: usemount imports have to be specific

otherwise we can get start errors due to an invalid import by react-use
pull/3083/head
William Grant 11 months ago
parent 3e1bf049e5
commit 7d890973d5

@ -1,6 +1,6 @@
import FocusTrap from 'focus-trap-react'; import FocusTrap from 'focus-trap-react';
import { ReactNode, useState } from 'react'; import { ReactNode, useState } from 'react';
import { useMount } from 'react-use'; import useMount from 'react-use/lib/useMount';
/** /**
* Focus trap which activates on mount. * Focus trap which activates on mount.

@ -7,7 +7,7 @@ import styled from 'styled-components';
import { isEmpty, isTypedArray } from 'lodash'; import { isEmpty, isTypedArray } from 'lodash';
import { CityResponse, Reader } from 'maxmind'; import { CityResponse, Reader } from 'maxmind';
import { useMount } from 'react-use'; import useMount from 'react-use/lib/useMount';
import { Snode } from '../../data/data'; import { Snode } from '../../data/data';
import { onionPathModal } from '../../state/ducks/modalDialog'; import { onionPathModal } from '../../state/ducks/modalDialog';
import { import {

@ -1,7 +1,7 @@
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import styled from 'styled-components'; import styled from 'styled-components';
import { useMount } from 'react-use'; import useMount from 'react-use/lib/useMount';
import { onboardingStore } from '../../state/onboarding/store'; import { onboardingStore } from '../../state/onboarding/store';
import { SessionTheme } from '../../themes/SessionTheme'; import { SessionTheme } from '../../themes/SessionTheme';
import { setSignInByLinking } from '../../util/storage'; import { setSignInByLinking } from '../../util/storage';

@ -1,6 +1,6 @@
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { useMount } from 'react-use'; import useMount from 'react-use/lib/useMount';
import { SettingsKey } from '../../../data/settings-key'; import { SettingsKey } from '../../../data/settings-key';
import { mnDecode } from '../../../session/crypto/mnemonic'; import { mnDecode } from '../../../session/crypto/mnemonic';
import { StringUtils } from '../../../session/utils'; import { StringUtils } from '../../../session/utils';

@ -1,5 +1,5 @@
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { useMount } from 'react-use'; import useMount from 'react-use/lib/useMount';
import { import {
AccountCreation, AccountCreation,
AccountRestoration, AccountRestoration,

@ -1,6 +1,8 @@
/** /**
* Note: The types defined in this file have to be self contained. * Note: The types defined in this file have to be self contained.
* We must not import anything in this file, especially not something relying on the window object (even indirectly, through an import chain). * We must not import anything in this file, especially not something relying on the window object (even indirectly, through an import chain).
*
* e.g. import type { YourTypeHere } from 'path/to/ReduxTypes';
*/ */
export type SessionSettingCategory = export type SessionSettingCategory =

Loading…
Cancel
Save