From 4c7839aaffb6187fe1256f17d9e3d557060eb342 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 25 Jun 2024 22:56:42 +0300 Subject: [PATCH] apiurl-fix+modal-fmt --- src/components/Nav/AuthModal/index.tsx | 4 +- src/components/Views/ConnectView.tsx | 128 +++++++++++++------------ src/config/config.ts | 2 +- src/context/ui.tsx | 8 +- src/utils/config.ts | 8 -- 5 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 src/utils/config.ts diff --git a/src/components/Nav/AuthModal/index.tsx b/src/components/Nav/AuthModal/index.tsx index 71079db2..64fdc5d3 100644 --- a/src/components/Nav/AuthModal/index.tsx +++ b/src/components/Nav/AuthModal/index.tsx @@ -30,8 +30,8 @@ export type AuthModalSearchParams = { } const AUTH_MODAL_MODES: Record = { - 'login': LoginForm, - 'register': RegisterForm, + login: LoginForm, + register: RegisterForm, 'send-reset-link': SendResetLinkForm, 'confirm-email': EmailConfirm, 'send-confirm-email': SendEmailConfirm, diff --git a/src/components/Views/ConnectView.tsx b/src/components/Views/ConnectView.tsx index 42bebf2b..066fc8a5 100644 --- a/src/components/Views/ConnectView.tsx +++ b/src/components/Views/ConnectView.tsx @@ -1,6 +1,6 @@ -import { createSignal } from "solid-js" -import { Show } from "solid-js/web" -import { useLocalize } from "~/context/localize" +import { createSignal } from 'solid-js' +import { Show } from 'solid-js/web' +import { useLocalize } from '~/context/localize' export const ConnectView = () => { const { t } = useLocalize() @@ -11,17 +11,19 @@ export const ConnectView = () => { e.preventDefault() setState('loading') - const postData = formRef? Array.from(formRef.elements).reduce( - (acc, element) => { - const formField = element as unknown as { name: string; value: string } - if (formField.name) { - acc[formField.name] = formField.value - } + const postData = formRef + ? Array.from(formRef.elements).reduce( + (acc, element) => { + const formField = element as unknown as { name: string; value: string } + if (formField.name) { + acc[formField.name] = formField.value + } - return acc - }, - {} as Record, - ) : {} + return acc + }, + {} as Record, + ) + : {} const requestOptions = { method: 'POST', @@ -45,53 +47,59 @@ export const ConnectView = () => { }) } - return (
-
-
- -

- {t('Suggest an idea')} -

+ return ( +
+
+
+ +

+ {t('Suggest an idea')} +

-

- {t('Want to suggest, discuss or advise something? Share a topic or an idea? Please send us a message!')} - {t('Specify your e-mail and we will reply.')} -

+

+ {t( + 'Want to suggest, discuss or advise something? Share a topic or an idea? Please send us a message!', + )} + {t('Specify your e-mail and we will reply.')} +

-
(formRef = el)}> -
- -
-
- - -
-
-