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

Add advise dialog form refactor #8

Open
wants to merge 7 commits into
base: testing
Choose a base branch
from

Conversation

benjacortesdev
Copy link

Posible implementación para el Issue #7

Copy link
Collaborator

@agustin-sanc agustin-sanc left a comment

Choose a reason for hiding this comment

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

Tremendo Benja! Te dejo unos comments, quedo atento. Lo de parameter destructuring te lo mande por el hilo de Discord también

Copy link
Collaborator

@agustin-sanc agustin-sanc left a comment

Choose a reason for hiding this comment

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

Buen trabajo @benjacortesdev! Te dejé review por el thread de Discord!

@benjacortesdev
Copy link
Author

@agustin-sanc Estoy de acuerdo con lo que propusiste en Discord! Ahí lo implementé, comentame que te parece!

Copy link
Collaborator

@agustin-sanc agustin-sanc left a comment

Choose a reason for hiding this comment

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

Tremendo Benja! Me encantó como quedó el refactor! Dejé algunos comentarios mínimos para pulir algunas cosas y ya estamos para mergear

}

export const AdviseForm = (props: AdviseFormProps) => {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Deberíamos borrar esta línea en blanco porque es la primera línea dentro de la función o componente, y es una convención no dejar nunca esta línea en blanco. Lo mismo se aplica a diferentes tipos de bloques: clases, objetos, tipos, archivos, etc.

Suggested change

/>

<Button type="submit" className="w-full">
{props.mode === "edit" ? "Guardar Cambios" : "Publicar"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Para continuar con la convención de escritura que venimos usando, aquí deberíamos usar letra mayúscula sólo para la primera palabra en los botones

Suggested change
{props.mode === "edit" ? "Guardar Cambios" : "Publicar"}
{props.mode === "edit" ? "Guardar cambios" : "Publicar"}

type EditFormProps = {
mode: "edit",
adviseId: string;
isOpen: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Estamos usando la prop isOpen para algo dentro de este componente?

Comment on lines +6 to +11
export interface EditAdviseDialogProps {
adviseId: string;
initialContent: string;
isOpen: boolean;
setDialogOpen: (open: boolean) => void;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aquí estaría bueno que definamos esto como un type en lugar de una interface, sólo para seguir la misma convención que los tipos de las props de los otros componentes

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.

2 participants