From cc5208cc6b8d3296160d93b14d7dbb6f3105ed9c Mon Sep 17 00:00:00 2001 From: Scai <59282365+alexevladgabriel@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:59:30 +0300 Subject: [PATCH] fix prettier linting issue --- .../components/auth/ForgotPasswordContainer.tsx | 4 +--- .../scripts/components/auth/LoginContainer.tsx | 16 ++++++++++++++-- .../components/auth/ResetPasswordContainer.tsx | 7 ++++++- .../components/dashboard/AccountApiContainer.tsx | 4 +++- .../components/dashboard/DashboardContainer.tsx | 4 +--- .../dashboard/forms/ConfigureTwoFactorForm.tsx | 10 ++++------ .../dashboard/forms/UpdateEmailAddressForm.tsx | 7 ++++++- .../dashboard/forms/UpdatePasswordForm.tsx | 6 ++---- .../components/dashboard/search/SearchModal.tsx | 6 +----- .../components/elements/ErrorBoundary.tsx | 5 ++++- .../scripts/hoc/RequireServerPermission.tsx | 4 +--- 11 files changed, 43 insertions(+), 30 deletions(-) diff --git a/resources/scripts/components/auth/ForgotPasswordContainer.tsx b/resources/scripts/components/auth/ForgotPasswordContainer.tsx index 73aff8100..3821332f8 100644 --- a/resources/scripts/components/auth/ForgotPasswordContainer.tsx +++ b/resources/scripts/components/auth/ForgotPasswordContainer.tsx @@ -79,9 +79,7 @@ export default () => { diff --git a/resources/scripts/components/auth/LoginContainer.tsx b/resources/scripts/components/auth/LoginContainer.tsx index 618bb8183..c6681e357 100644 --- a/resources/scripts/components/auth/LoginContainer.tsx +++ b/resources/scripts/components/auth/LoginContainer.tsx @@ -78,9 +78,21 @@ const LoginContainer = ({ history }: RouteComponentProps) => { > {({ isSubmitting, setSubmitting, submitForm }) => ( - +
- +
- +

- {showOnlyAdmin - ? t('no-other-servers') - : t('no-servers-associated')} + {showOnlyAdmin ? t('no-other-servers') : t('no-servers-associated')}

) } diff --git a/resources/scripts/components/dashboard/forms/ConfigureTwoFactorForm.tsx b/resources/scripts/components/dashboard/forms/ConfigureTwoFactorForm.tsx index 0f6e846e5..fa572b062 100644 --- a/resources/scripts/components/dashboard/forms/ConfigureTwoFactorForm.tsx +++ b/resources/scripts/components/dashboard/forms/ConfigureTwoFactorForm.tsx @@ -33,14 +33,12 @@ export default () => { setVisible(null)} onTokens={onTokens} /> 0} onClose={() => setTokens([])} /> setVisible(null)} /> -

- {isEnabled - ? t('two_factor.disable.help') - : t('two_factor.enable.help')} -

+

{isEnabled ? t('two_factor.disable.help') : t('two_factor.enable.help')}

{isEnabled ? ( - setVisible('disable')}>{t('two_factor.disable.button')} + setVisible('disable')}> + {t('two_factor.disable.button')} + ) : ( )} diff --git a/resources/scripts/components/dashboard/forms/UpdateEmailAddressForm.tsx b/resources/scripts/components/dashboard/forms/UpdateEmailAddressForm.tsx index 66b57983b..2258e67b9 100644 --- a/resources/scripts/components/dashboard/forms/UpdateEmailAddressForm.tsx +++ b/resources/scripts/components/dashboard/forms/UpdateEmailAddressForm.tsx @@ -59,7 +59,12 @@ export default () => {
- +
{ function (value) { return value === this.parent.password; } - ), + ), }); const user = useStoreState((state: State) => state.user.data); @@ -80,9 +80,7 @@ export default () => { type={'password'} name={'password'} label={t('new_password', { ns: 'strings' })} - description={ - t('password.requirements') - } + description={t('password.requirements')} />
diff --git a/resources/scripts/components/dashboard/search/SearchModal.tsx b/resources/scripts/components/dashboard/search/SearchModal.tsx index c6f796a80..c6512b8e7 100644 --- a/resources/scripts/components/dashboard/search/SearchModal.tsx +++ b/resources/scripts/components/dashboard/search/SearchModal.tsx @@ -90,11 +90,7 @@ export default ({ ...props }: Props) => { {({ isSubmitting }) => ( - + diff --git a/resources/scripts/components/elements/ErrorBoundary.tsx b/resources/scripts/components/elements/ErrorBoundary.tsx index fd99df033..b31b5a9ef 100644 --- a/resources/scripts/components/elements/ErrorBoundary.tsx +++ b/resources/scripts/components/elements/ErrorBoundary.tsx @@ -28,7 +28,10 @@ class ErrorBoundary extends React.Component<{}, State> {

- +

diff --git a/resources/scripts/hoc/RequireServerPermission.tsx b/resources/scripts/hoc/RequireServerPermission.tsx index 5fadf098d..782c1130c 100644 --- a/resources/scripts/hoc/RequireServerPermission.tsx +++ b/resources/scripts/hoc/RequireServerPermission.tsx @@ -13,9 +13,7 @@ const RequireServerPermission: React.FC = ({ child return ( - } + renderOnError={} > {children}