Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#45] Agregada verificacion al login #48

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

Conversation

Durphan
Copy link

@Durphan Durphan commented Feb 29, 2024

  • Agregada verificacion a la login page utilizando RegExp
  • Agregado dos props al Button primary
  • Cambio en el estilo del logo del login
  • Fixeo de la llamada a una funcion en Order

Copy link

vercel bot commented Feb 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sunrise ❌ Failed (Inspect) Mar 25, 2024 7:01pm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existen muchos cambios en el package-lock, estos a qué se deben?

justify-content: space-between;
gap: 1rem;
align-items: center;
justify-content: center;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podemos agregar a la descripción del PR, una captura de la web antes - después de este cambio?

@@ -21,6 +21,10 @@ const SubHeaderSection = styled.div`
`;

export default function ChoosePayment() {
function handleClick(){
console.log("payment")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El console.log nos servira en el dia a dia de desarrollo, pero no deberia estar en produccion, podemos tambien dejarle asociado in TODO, para darle funcionalidad a dicho handle.

// TODO: ISSUE-01 Crear funcionalidad para elegir el método de pago al hacer click.
console.log("payment")

function validateEmail(emailToValidate) {
const emailRegex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
if (!emailRegex.test(emailToValidate)) {
console.log("El email debe contener un @ y .com");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quizás en este punto deberíamos retornar un String, para poder renderizar dicho mensaje de cara al usuario en lugar de sólo verlo por consola.

}

function validatePassword(passwordToValidate) {
const passwordRegex = /[0-9]/;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podriamos utilizar una rgx, que haga todo lo que se valida en los ifs, entonces tenemos una función más limpia:

^(?=.*[0-9]).{5,}$

Entonces, si la password no coincide con el patrón, le retornamos el mensaje al usuario para que vuelva a ingresar la contraseña hasta que sea válida

if (!emailRegex.test(emailToValidate)) {
setEmailError(`Asegurese de colocar un email correcto`);
} else {
setEmailError(``);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setEmailError, y setPasswordError, existen?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Al parecer son setters de estados del componente.

Copy link
Collaborator

@JoeOsG JoeOsG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Listo.

src/atoms/p.js Outdated

import colors from '../styles/colors';

export const ErrorP = styled.p`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquí me parece que quedaría claro que el atomo tenga un nombre descriptivo. I.E. Paragraph.

@@ -8,7 +8,7 @@ import {TopMenu} from './TopMenu';
const Container = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En lugar de mover la justificación de contenido, probar con el padding para acercarse mas al diseño.

JoeOsG
JoeOsG previously approved these changes Mar 21, 2024
@JoeOsG JoeOsG requested review from sarganar and rolivencia March 21, 2024 21:39
src/atoms/CoffeeBanner.jsx Outdated Show resolved Hide resolved
@@ -21,6 +21,10 @@ const SubHeaderSection = styled.div`
`;

export default function ChoosePayment() {
function handleClick() {
console.log('payment');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No debe hacerse commit de los console.log. Si una función debe ser implementada, dejar un comentario o tirar una excepción.

src/molecules/TopMenu.jsx Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@ const wordsColor = {
negro: '#000',
gris: '#C5C5C5',
marron: '#5E3E00',
rojo: `#fc0339`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Los colores están definidos en ambos idiomas? Creo que deberíamos de unificarlos a todos en inglés.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants