From db138a252ab26d75a6f649041fff24356614ca05 Mon Sep 17 00:00:00 2001 From: Borislav Petrovikj Date: Mon, 17 Jul 2023 12:01:07 +0200 Subject: [PATCH] fix: pr comments --- public/locales/en/user.json | 5 ++++- public/locales/es/user.json | 5 ++++- src/components/ProfileBox/AddNewProfile.tsx | 4 +++- src/components/ProfileBox/ProfileBox.module.scss | 9 +++++---- src/containers/Profiles/Profiles.tsx | 7 ++++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/public/locales/en/user.json b/public/locales/en/user.json index eb55fa6df..79364381d 100644 --- a/public/locales/en/user.json +++ b/public/locales/en/user.json @@ -1,6 +1,7 @@ { "account": { "about_you": "Profile info", + "add_profile": "Add profile", "cancel": "Cancel", "confirm_password": "Confirm password", "continue": "Continue", @@ -39,12 +40,14 @@ "firstname": "First name", "hide_password": "Hide password", "lastname": "Last name", + "manage_profiles": "Manage profiles", "password": "Password", "save": "Save", "security": "Password", "terms_and_tracking": "Legal & Marketing", "update_consents": "Update consents", - "view_password": "View password" + "view_password": "View password", + "who_is_watching": "Who’s watching?" }, "favorites": { "clear": "Clear favorites", diff --git a/public/locales/es/user.json b/public/locales/es/user.json index 0dbabd449..63366ee08 100644 --- a/public/locales/es/user.json +++ b/public/locales/es/user.json @@ -1,6 +1,7 @@ { "account": { "about_you": "Información de perfil", + "add_profile": "Añadir perfil", "cancel": "Cancelar", "confirm_password": "Confirmar contraseña", "continue": "Continuar", @@ -39,12 +40,14 @@ "firstname": "Nombre", "hide_password": "Ocultar contraseña", "lastname": "Apellido", + "manage_profiles": "Administrar perfiles", "password": "Contraseña", "save": "Guardar", "security": "Contraseña", "terms_and_tracking": "Jurídico y marketing", "update_consents": "Actualizar consentimientos", - "view_password": "Ver contraseña" + "view_password": "Ver contraseña", + "who_is_watching": "¿Quién está mirando?" }, "favorites": { "clear": "Borrar favoritos", diff --git a/src/components/ProfileBox/AddNewProfile.tsx b/src/components/ProfileBox/AddNewProfile.tsx index 5a8fd7c21..51a2290c0 100644 --- a/src/components/ProfileBox/AddNewProfile.tsx +++ b/src/components/ProfileBox/AddNewProfile.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { useTranslation } from 'react-i18next'; import styles from './ProfileBox.module.scss'; @@ -7,6 +8,7 @@ type Props = { }; const AddNewProfile = ({ onClick }: Props) => { + const { t } = useTranslation('user'); return (
@@ -17,7 +19,7 @@ const AddNewProfile = ({ onClick }: Props) => { />
-

Add profile

+

{t('account.add_profile')}

); }; diff --git a/src/components/ProfileBox/ProfileBox.module.scss b/src/components/ProfileBox/ProfileBox.module.scss index 4c93116a9..1c4017e7a 100644 --- a/src/components/ProfileBox/ProfileBox.module.scss +++ b/src/components/ProfileBox/ProfileBox.module.scss @@ -1,9 +1,11 @@ @use 'src/styles/variables'; +$avatar-size: 75px; + .inner { position: relative; border: 2px solid rgba(95, 114, 152); - border-radius: 74px; + border-radius:$avatar-size; &:hover { border: 1px solid variables.$white; opacity: 0.8; @@ -48,9 +50,8 @@ display: flex; justify-content: center; align-items: center; - // border: 1px solid rgba(255, 255, 255, 0.3); border: 1px solid white; - border-radius: 75px; + border-radius: $avatar-size; } .overlay { position: absolute; @@ -63,7 +64,7 @@ height: 100%; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000000 95%); border: 1px solid transparent; - border-radius: 75px; + border-radius: $avatar-size; } &:hover { diff --git a/src/containers/Profiles/Profiles.tsx b/src/containers/Profiles/Profiles.tsx index 7c7a7b7ea..3355c1a45 100644 --- a/src/containers/Profiles/Profiles.tsx +++ b/src/containers/Profiles/Profiles.tsx @@ -2,6 +2,7 @@ import { useEffect } from 'react'; import { useNavigate } from 'react-router'; import { useQuery } from 'react-query'; import shallow from 'zustand/shallow'; +import { useTranslation } from 'react-i18next'; import styles from './Profiles.module.scss'; @@ -26,7 +27,7 @@ type Props = { const Profiles = ({ editMode = false }: Props) => { const navigate = useNavigate(); - + const { t } = useTranslation('user'); const { canManageProfiles, loading } = useAccountStore(({ canManageProfiles, loading }) => ({ canManageProfiles, loading }), shallow); useEffect(() => { @@ -79,7 +80,7 @@ const Profiles = ({ editMode = false }: Props) => {

Create your profile

) : ( -

Who’s watching?

+

{t('account.who_is_watching')}

)}
{data?.responseData.collection?.map((profile: Profile) => ( @@ -98,7 +99,7 @@ const Profiles = ({ editMode = false }: Props) => { {activeProfiles > 0 && ( <> {!editMode ? ( -