diff --git a/frontend/src/Pagina/Inicio.jsx b/frontend/src/Pagina/Inicio.jsx
index 14d639c..34f0d6e 100644
--- a/frontend/src/Pagina/Inicio.jsx
+++ b/frontend/src/Pagina/Inicio.jsx
@@ -34,6 +34,7 @@ const Inicio = () => {
total={tonto.total}
titulos={tonto.titulos}
mensaje="Tonto del día de hoy es "
+ todaLaInfo=""
/>
)}
{errorTonto && (
@@ -43,6 +44,7 @@ const Inicio = () => {
total={"--"}
titulos={["----"]}
mensaje="El algoritmo está preparando un tonto "
+ todaLaInfo=""
/>
)}
@@ -54,6 +56,7 @@ const Inicio = () => {
total={"--"}
titulos={["--Próximamente--"]}
mensaje="Cowboy del día de hoy es "
+ todaLaInfo=""
/>
)}
{errorCowboy && (
@@ -63,6 +66,7 @@ const Inicio = () => {
total={"--"}
titulos={["----"]}
mensaje="El algoritmo está preparando un cowboy "
+ todaLaInfo=""
/>
)}
From 0993b5f486171b9f3c26ababa715dd55677541e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20N=C3=BA=C3=B1ez?=
<124943644+JLeonN@users.noreply.github.com>
Date: Wed, 24 Apr 2024 06:58:16 -0300
Subject: [PATCH 7/9] Un margin CSS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Borré un
de más que había. También le di un poco de margin-top: 20px.
---
frontend/src/App.css | 1 +
.../PerfilDeParticipante/ListaTitulos.jsx | 83 +++++++++----------
2 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/frontend/src/App.css b/frontend/src/App.css
index 180fa29..ae70d67 100644
--- a/frontend/src/App.css
+++ b/frontend/src/App.css
@@ -171,6 +171,7 @@ span {
max-width: 500px;
margin-left: auto;
margin-right: auto;
+ margin-top: 20px;
}
.ListaTitulos:hover {
color: var(--hoverTexto);
diff --git a/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/ListaTitulos.jsx b/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/ListaTitulos.jsx
index dc705fd..ca9b656 100644
--- a/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/ListaTitulos.jsx
+++ b/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/ListaTitulos.jsx
@@ -1,52 +1,51 @@
import useTitulos from "../../../Hooks/useTitulos";
const ListaTitulos = ({ idCowboy }) => {
- const { borrarTitulo, crearTitulo, error, titulos, setInput, input } = useTitulos(idCowboy);
+ const { borrarTitulo, crearTitulo, error, titulos, setInput, input } =
+ useTitulos(idCowboy);
return (
<>
+
+ setInput(input.target.value)}
+ />
+
+
-
- setInput(input.target.value)}
- />
-
-
-
- {error == true && (
-
No se puede duplicar el titulo
- )}
-
-
- {titulos &&
- titulos.map((titulo) => (
-
- ))}
-
+ {error == true && (
+
No se puede duplicar el titulo
+ )}
+
+
+ {titulos &&
+ titulos.map((titulo) => (
+
+ ))}
>
);
From 98dbacfec8cbaff472f41b06c90a9f1055a6c56e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20N=C3=BA=C3=B1ez?=
<124943644+JLeonN@users.noreply.github.com>
Date: Wed, 24 Apr 2024 22:11:54 -0300
Subject: [PATCH 8/9] =?UTF-8?q?Bot=C3=B3n=20para=20compartir=20mejorado?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/Componentes/Tarjeta/Tarjeta.jsx | 20 ++++++++++++++-----
.../src/Pagina/CowboyDelDia/CowboyDelDia.jsx | 6 ++----
frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx | 5 ++---
.../EstructuraDePerfil.jsx | 3 +--
frontend/src/Pagina/Inicio.jsx | 12 ++++-------
5 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/frontend/src/Componentes/Tarjeta/Tarjeta.jsx b/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
index 8c9b005..bdb0d3d 100644
--- a/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
+++ b/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
@@ -1,10 +1,10 @@
import { Link } from "react-router-dom";
-const TarjetaTonta = ({ nombre, total, titulos, mensaje, todaLaInfo }) => {
+const TarjetaTonta = ({ nombre, total, titulos, todaLaInfo }) => {
let laInfo = "";
- if (todaLaInfo != "") {
+ if (todaLaInfo == "perfil") {
laInfo =
- mensaje +
+ "Tonto seleccionado: " +
nombre +
"%0A" +
"Veces tonto: " +
@@ -12,8 +12,18 @@ const TarjetaTonta = ({ nombre, total, titulos, mensaje, todaLaInfo }) => {
"%0A" +
"Titulos: " +
titulos;
- } else {
- laInfo = mensaje + nombre;
+ }
+ if (todaLaInfo == "tontoDelDía") {
+ laInfo = "Tonto del día de hoy es " + nombre;
+ }
+ if (todaLaInfo == "CowboyDelDía") {
+ laInfo = "Cowboy del día de hoy es " + nombre;
+ }
+ if (todaLaInfo == "errorTonto") {
+ laInfo = "El algoritmo está preparando un tontos " + nombre;
+ }
+ if (todaLaInfo == "errorCowboy") {
+ laInfo = "El algoritmo está preparando un cowboy " + nombre;
}
return (
diff --git a/frontend/src/Pagina/CowboyDelDia/CowboyDelDia.jsx b/frontend/src/Pagina/CowboyDelDia/CowboyDelDia.jsx
index f71f734..f2cfbc8 100644
--- a/frontend/src/Pagina/CowboyDelDia/CowboyDelDia.jsx
+++ b/frontend/src/Pagina/CowboyDelDia/CowboyDelDia.jsx
@@ -29,8 +29,7 @@ const CowboyDelDia = () => {
nombre={cowboy.name}
total={"--"}
titulos={["--Próximamente--"]}
- mensaje="Cowboy del día de hoy es "
- todaLaInfo=""
+ todaLaInfo="CowboyDelDía"
/>
)}
{errorCowboy && (
@@ -39,8 +38,7 @@ const CowboyDelDia = () => {
nombre={"Procesando un cowboy"}
total={"--"}
titulos={["----"]}
- mensaje="El algoritmo está preparando un cowboy "
- todaLaInfo=""
+ todaLaInfo="errorCowboy"
/>
)}
diff --git a/frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx b/frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx
index 26e4fea..a08f14d 100644
--- a/frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx
+++ b/frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx
@@ -19,7 +19,7 @@ const ListaElMasTonto = () => {
nombre={tonto.nombre}
total={tonto.total}
titulos={tonto.titulos}
- todaLaInfo=""
+ todaLaInfo="tontoDelDía"
/>
)}
{errorTonto && (
@@ -28,8 +28,7 @@ const ListaElMasTonto = () => {
nombre={"¡Procesando!"}
total={"--"}
titulos={["----"]}
- mensaje="El algoritmo está preparando un tonto "
- todaLaInfo=""
+ todaLaInfo="errorTonto"
/>
)}
diff --git a/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/EstructuraDePerfil.jsx b/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/EstructuraDePerfil.jsx
index b77a546..4bf4daf 100644
--- a/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/EstructuraDePerfil.jsx
+++ b/frontend/src/Pagina/ElMasTonto/PerfilDeParticipante/EstructuraDePerfil.jsx
@@ -19,8 +19,7 @@ const EstructuraDePerfil = () => {
nombre={participante.nombre}
total={participante.total}
titulos={participante.titulos}
- mensaje="Tonto seleccionado: "
- todaLaInfo={participante.total + participante.titulos}
+ todaLaInfo="perfil"
/>
{/* Lista de titulos */}
diff --git a/frontend/src/Pagina/Inicio.jsx b/frontend/src/Pagina/Inicio.jsx
index 34f0d6e..8ee599c 100644
--- a/frontend/src/Pagina/Inicio.jsx
+++ b/frontend/src/Pagina/Inicio.jsx
@@ -33,8 +33,7 @@ const Inicio = () => {
nombre={tonto.nombre}
total={tonto.total}
titulos={tonto.titulos}
- mensaje="Tonto del día de hoy es "
- todaLaInfo=""
+ todaLaInfo="tontoDelDía"
/>
)}
{errorTonto && (
@@ -43,8 +42,7 @@ const Inicio = () => {
nombre={"¡Procesando!"}
total={"--"}
titulos={["----"]}
- mensaje="El algoritmo está preparando un tonto "
- todaLaInfo=""
+ todaLaInfo="errorTonto"
/>
)}
@@ -55,8 +53,7 @@ const Inicio = () => {
nombre={cowboy.name}
total={"--"}
titulos={["--Próximamente--"]}
- mensaje="Cowboy del día de hoy es "
- todaLaInfo=""
+ todaLaInfo="CowboyDelDía"
/>
)}
{errorCowboy && (
@@ -65,8 +62,7 @@ const Inicio = () => {
nombre={"¡Procesando!"}
total={"--"}
titulos={["----"]}
- mensaje="El algoritmo está preparando un cowboy "
- todaLaInfo=""
+ todaLaInfo="errorCowboy"
/>
)}
From 6ba3702a8085f95f14774530cfbe9dff5ab9e961 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leonardo=20N=C3=BA=C3=B1ez?=
<124943644+JLeonN@users.noreply.github.com>
Date: Thu, 25 Apr 2024 07:05:16 -0300
Subject: [PATCH 9/9] Cambiando nombres a variables.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Estoy cambiando los nombres de algunas variables para que el código sea más legible y fácil de entender. 💻
---
frontend/src/Componentes/Tarjeta/Tarjeta.jsx | 26 +++++++++----------
.../src/Pagina/CowboyDelDia/CowboyDelDia.jsx | 4 +--
frontend/src/Pagina/ElMasTonto/ElMasTonto.jsx | 4 +--
.../EstructuraDePerfil.jsx | 2 +-
frontend/src/Pagina/Inicio.jsx | 8 +++---
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/frontend/src/Componentes/Tarjeta/Tarjeta.jsx b/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
index bdb0d3d..08b507a 100644
--- a/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
+++ b/frontend/src/Componentes/Tarjeta/Tarjeta.jsx
@@ -1,9 +1,9 @@
import { Link } from "react-router-dom";
-const TarjetaTonta = ({ nombre, total, titulos, todaLaInfo }) => {
- let laInfo = "";
- if (todaLaInfo == "perfil") {
- laInfo =
+const TarjetaTonta = ({ nombre, total, titulos, tipoDeMensaje }) => {
+ let mensajeFinal = "";
+ if (tipoDeMensaje == "perfilTonto") {
+ mensajeFinal =
"Tonto seleccionado: " +
nombre +
"%0A" +
@@ -13,17 +13,17 @@ const TarjetaTonta = ({ nombre, total, titulos, todaLaInfo }) => {
"Titulos: " +
titulos;
}
- if (todaLaInfo == "tontoDelDía") {
- laInfo = "Tonto del día de hoy es " + nombre;
+ if (tipoDeMensaje == "tontoDelDía") {
+ mensajeFinal = "Tonto del día de hoy es " + nombre;
}
- if (todaLaInfo == "CowboyDelDía") {
- laInfo = "Cowboy del día de hoy es " + nombre;
+ if (tipoDeMensaje == "cowboyDelDía") {
+ mensajeFinal = "Cowboy del día de hoy es " + nombre;
}
- if (todaLaInfo == "errorTonto") {
- laInfo = "El algoritmo está preparando un tontos " + nombre;
+ if (tipoDeMensaje == "errorTonto") {
+ mensajeFinal = "El algoritmo está preparando un tontos " + nombre;
}
- if (todaLaInfo == "errorCowboy") {
- laInfo = "El algoritmo está preparando un cowboy " + nombre;
+ if (tipoDeMensaje == "errorCowboy") {
+ mensajeFinal = "El algoritmo está preparando un cowboy " + nombre;
}
return (
@@ -54,7 +54,7 @@ const TarjetaTonta = ({ nombre, total, titulos, todaLaInfo }) => {