-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error404 casi terminado. #12
Changes from 10 commits
2ac912e
f0175d0
64dfeae
984cb02
a40435b
a5ed1a6
2faf2ff
fa5efa9
a923880
6358f1e
756e270
5bd4c26
3168e11
fdbf089
dd1ec70
8496c7c
f444332
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Link } from "react-router-dom"; | ||
|
||
const Botones = ({ button }) => { | ||
if (!button) { | ||
return; | ||
} | ||
|
||
return ( | ||
<> | ||
<Link to={button.ruta}> | ||
<button type="button" className="btn btn-dark"> | ||
{button.infBoton} | ||
</button> | ||
</Link> | ||
</> | ||
); | ||
}; | ||
|
||
export default Botones; | ||
|
||
// function Botones(props) { | ||
// const { infBoton, ruta } = props; | ||
|
||
// return ( | ||
// <Link to={ruta}> | ||
// <button type="button" className="btn"> | ||
// {infBoton} | ||
// </button> | ||
// </Link> | ||
// ); | ||
// } | ||
|
||
// export default Botones; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import TarjetaDia from "./Pagina/InfoTonto/TarjetaDia"; | ||
|
||
const Inicio = () => { | ||
const tarjeta = { | ||
persona: "Nombre: Jorge", | ||
cantidad: "68", | ||
titulos: "Titulos", | ||
listaTitulos: "lol", | ||
}; | ||
|
||
return ( | ||
<> | ||
<section> | ||
{/* Tarjeta del día del mas tonto */} | ||
<h3 className="tituloH3">Tonto del día de hoy es...</h3> | ||
<TarjetaDia tarjeta={tarjeta} /> | ||
|
||
{/* Tarjeta del cowboy del día */} | ||
<h3 className="tituloH3">Cowboy del día de hoy es...</h3> | ||
<TarjetaDia /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Es mejor no usar el componente tarjeta si no va a tener propiedades y va a estar vacio. Ademas, no es un uso correcto para el componente. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. La idea era incluir los datos del Cowboy del día, pero lamentablemente no pude completarlo a tiempo. Ese es el plan. Pretendo que funcione de manera similar al Tonto del día, pero enfocado en el Cowboy destacado del día. |
||
</section> | ||
</> | ||
); | ||
}; | ||
|
||
export default Inicio; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
import Botones from "../../Botones.jsx"; | ||
import TarjetaDia from "../InfoTonto/TarjetaDia.jsx"; | ||
|
||
const Error404 = () => { | ||
const tarjeta = { | ||
persona: "Error 404", | ||
titulos: "¡Alto ahí, forastero!", | ||
listaTitulos: | ||
"Parece que has encontrado un territorio desconocido en el vasto desierto digital. No te preocupes, nuestros sheriff de la red están en camino para guiarte de regreso al pueblo principal. Mientras tanto, ¿por qué no te relajas con un poco de música en nuestro salon virtual?", | ||
boton: "boton", | ||
}; | ||
|
||
const button = { | ||
ruta: "/", | ||
infBoton: "Inicio" | ||
} | ||
|
||
return ( | ||
<> | ||
<h2>Error 404</h2> | ||
<div> | ||
<TarjetaDia tarjeta={tarjeta} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Creo que para el error 404 no tendriamos que usar el componente El componente There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Al principio, estaba utilizando HTML plano, como mencionas. Después lo cambié, ¿por qué? Bueno, ¡ni yo mismo lo sé, jaja! |
||
<Botones button={button} /> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default Error404; | ||
export default Error404; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import ListaTitulos from "./ListaTitulos"; | ||
|
||
|
||
const ListaParticipantes = () => { | ||
return ( | ||
<> | ||
<ol className="principal list-group list-group-numbered"> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">German</div> | ||
<ListaTitulos /> | ||
</div> | ||
<span className="badge">88</span> | ||
</li> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">Cristian</div> | ||
--Título más reciente.-- | ||
</div> | ||
<span className="badge">78</span> | ||
</li> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">Pablo</div> | ||
--Título más reciente.-- | ||
</div> | ||
<span className="badge">75</span> | ||
</li> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">Franco</div> | ||
--Título más reciente.-- | ||
</div> | ||
<span className="badge">75</span> | ||
</li> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">Marcelo</div> | ||
--Título más reciente.-- | ||
</div> | ||
<span className="badge">68</span> | ||
</li> | ||
<li className="list-group-item d-flex justify-content-between align-items-start"> | ||
<div className="logros ms-2 me-auto"> | ||
<div className="nombre fw-bold">Jorge</div> | ||
--Título más reciente.-- | ||
</div> | ||
<span className="badge">68</span> | ||
</li> | ||
</ol> | ||
</> | ||
); | ||
}; | ||
|
||
export default ListaParticipantes; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import TarjetaDia from "./InfoTonto/TarjetaDia"; | ||
import ListaParticipantes from "./InfoTonto/ListaParticipantes"; | ||
|
||
const ListaElMasTonto = () => { | ||
const tarjeta = { | ||
persona: "Nombre: Jorge", | ||
cantidad: "68", | ||
titulos: "Titulos", | ||
listaTitulos: "lol", | ||
}; | ||
const LP = { | ||
persona: "Jorge", | ||
cantidad: "68", | ||
}; | ||
|
||
return ( | ||
<> | ||
<section> | ||
{/* Tarjeta del día */} | ||
<h3 className="tituloH3">Tonto del día de hoy es...</h3> | ||
<TarjetaDia tarjeta={tarjeta} /> | ||
|
||
{/* Lista de participantes */} | ||
<h3 className="tituloH3">Lista de participantes</h3> | ||
<ListaParticipantes LP={LP} /> | ||
<ListaParticipantes LP={LP} /> | ||
</section> | ||
</> | ||
); | ||
}; | ||
|
||
export default ListaElMasTonto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Este fue lo que te dijo ChatGPT?
Creo que no es necesario, me parece que se puede borrar.
No sería correcto crear un boton que no tiene ruta ni informacion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si eso mismo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acabo de eliminarlo y no tuve ningún problema, tal como me mencionaste. Sin embargo, en el componente de la tarjeta del día, todavía tengo dificultades.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Franco, ya he solucionado el problema. Como mencionaste, un componente vacío puede generar un error. He comentado esa parte del código y eliminado el 'if', y ahora funciona correctamente.