chore: lint

pull/3206/head
Audric Ackermann 9 months ago
parent 68a1953389
commit f5812b6fce

@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-misused-promises */ /* eslint-disable @typescript-eslint/no-misused-promises */
import autoBind from 'auto-bind'; import autoBind from 'auto-bind';
import { isEmpty } from 'lodash';
import { Component } from 'react'; import { Component } from 'react';
import { ToastUtils } from '../../session/utils'; import { ToastUtils } from '../../session/utils';
import { sessionPassword } from '../../state/ducks/modalDialog'; import { sessionPassword } from '../../state/ducks/modalDialog';
@ -12,7 +13,6 @@ import { getPasswordHash, Storage } from '../../util/storage';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton'; import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SpacerSM } from '../basic/Text'; import { SpacerSM } from '../basic/Text';
import { SessionWrapperModal } from '../SessionWrapperModal'; import { SessionWrapperModal } from '../SessionWrapperModal';
import { isEmpty } from 'lodash';
interface Props { interface Props {
passwordAction: PasswordAction; passwordAction: PasswordAction;

@ -26,13 +26,13 @@ const StyledBackButtonContainer = styled(Flex)`
`; `;
export const BackButtonWithinContainer = ({ export const BackButtonWithinContainer = ({
children, children,
margin, margin,
callback, callback,
onQuitVisible, onQuitVisible,
shouldQuitOnClick, shouldQuitOnClick,
quitI18nMessageArgs, quitI18nMessageArgs,
}: { }: {
children: ReactNode; children: ReactNode;
margin?: string; margin?: string;
callback?: () => void; callback?: () => void;
@ -62,11 +62,11 @@ export const BackButtonWithinContainer = ({
}; };
export const BackButton = ({ export const BackButton = ({
callback, callback,
onQuitVisible, onQuitVisible,
shouldQuitOnClick, shouldQuitOnClick,
quitI18nMessageArgs, quitI18nMessageArgs,
}: { }: {
callback?: () => void; callback?: () => void;
onQuitVisible?: () => void; onQuitVisible?: () => void;
shouldQuitOnClick?: boolean; shouldQuitOnClick?: boolean;
@ -99,13 +99,13 @@ export const BackButton = ({
onClickOk: async () => { onClickOk: async () => {
try { try {
window.log.warn( window.log.warn(
'[onboarding] Deleting everything on device but keeping network data', '[onboarding] Deleting everything on device but keeping network data'
); );
await deleteDbLocally(); await deleteDbLocally();
} catch (error) { } catch (error) {
window.log.warn( window.log.warn(
'[onboarding] Something went wrong when deleting all local data:', '[onboarding] Something went wrong when deleting all local data:',
error && error.stack ? error.stack : error, error && error.stack ? error.stack : error
); );
} finally { } finally {
window.restart(); window.restart();
@ -114,7 +114,7 @@ export const BackButton = ({
onClickCancel: () => { onClickCancel: () => {
window.inboxStore?.dispatch(updateQuitModal(null)); window.inboxStore?.dispatch(updateQuitModal(null));
}, },
}), })
); );
return; return;
} }

@ -1110,8 +1110,6 @@ async function sendOnionRequestSnodeDest(
}); });
} }
/** /**
* If the fetch throws a retryable error we retry this call with a new path at most 3 times. If another error happens, we return it. If we have a result we just return it. * If the fetch throws a retryable error we retry this call with a new path at most 3 times. If another error happens, we return it. If we have a result we just return it.
*/ */

Loading…
Cancel
Save