From d36821dee1f9fe9827f1dab329029d58d8696520 Mon Sep 17 00:00:00 2001 From: Bohdan Date: Mon, 29 Jul 2024 11:47:43 +0300 Subject: [PATCH 1/2] rewrite GoogleLogin to tsx format --- ...{GoogleLogin.styles.js => GoogleLogin.styles.ts} | 2 +- .../{GoogleLogin.jsx => GoogleLogin.tsx} | 13 ++++++++++++- tsconfig.json | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) rename src/containers/guest-home-page/google-login/{GoogleLogin.styles.js => GoogleLogin.styles.ts} (95%) rename src/containers/guest-home-page/google-login/{GoogleLogin.jsx => GoogleLogin.tsx} (90%) diff --git a/src/containers/guest-home-page/google-login/GoogleLogin.styles.js b/src/containers/guest-home-page/google-login/GoogleLogin.styles.ts similarity index 95% rename from src/containers/guest-home-page/google-login/GoogleLogin.styles.js rename to src/containers/guest-home-page/google-login/GoogleLogin.styles.ts index ba0270263..a62e0fa0b 100644 --- a/src/containers/guest-home-page/google-login/GoogleLogin.styles.js +++ b/src/containers/guest-home-page/google-login/GoogleLogin.styles.ts @@ -34,6 +34,6 @@ export const styles = { googleForm: { display: 'flex', flexDirection: 'column', - minWidth: { sm: '330px' } + minWidth: '330px' } } diff --git a/src/containers/guest-home-page/google-login/GoogleLogin.jsx b/src/containers/guest-home-page/google-login/GoogleLogin.tsx similarity index 90% rename from src/containers/guest-home-page/google-login/GoogleLogin.jsx rename to src/containers/guest-home-page/google-login/GoogleLogin.tsx index b20117f82..1bb46ba66 100644 --- a/src/containers/guest-home-page/google-login/GoogleLogin.jsx +++ b/src/containers/guest-home-page/google-login/GoogleLogin.tsx @@ -8,8 +8,19 @@ import LoginDialog from '~/containers/guest-home-page/login-dialog/LoginDialog' import GoogleButton from '~/containers/guest-home-page/google-button/GoogleButton' import { styles } from '~/containers/guest-home-page/google-login/GoogleLogin.styles' +import { UserRole } from '~/types' -const GoogleLogin = ({ type, buttonWidth, role }) => { +interface GoogleLoginProps { + type: 'signup' | 'login' + buttonWidth: string + role: UserRole +} + +const GoogleLogin: React.FC = ({ + type, + buttonWidth, + role +}) => { const { t, i18n } = useTranslation() const { whatCanYouDo } = guestRoutes.navBar const { openModal, closeModal } = useModalContext() diff --git a/tsconfig.json b/tsconfig.json index 694261e69..6da05dc05 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,4 @@ + { "compilerOptions": { "module": "Esnext", From dc7e5afa717c900d9056e14aff7fe32e39cc4c6c Mon Sep 17 00:00:00 2001 From: Bohdan Mylyi <123481658+BohdanMylyi@users.noreply.github.com> Date: Mon, 29 Jul 2024 13:06:36 +0300 Subject: [PATCH 2/2] remove unnessesary space --- tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 6da05dc05..694261e69 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,3 @@ - { "compilerOptions": { "module": "Esnext",