|
1 | | -import Link from "next/link"; |
2 | | -import { Main, NotFoundText, NotFoundTitle } from "../ui/ComponentsStyled"; |
3 | | -import Image from "next/image"; |
| 1 | +import { useTranslations } from "next-intl"; |
4 | 2 |
|
| 3 | +import { Layout, MainBg } from "../ui/lugs"; // Tus componentes de estilo |
| 4 | +import { Link } from "@/i18n/navigation"; |
| 5 | + |
| 6 | +// Nota: Este archivo hereda automáticamente el layout de [locale], |
| 7 | +// así que ya tendrá Navbar y Footer. |
5 | 8 | export default function NotFound() { |
| 9 | + const t = useTranslations("NotFound"); |
| 10 | + |
6 | 11 | return ( |
7 | | - <Main |
8 | | - style={{ |
9 | | - backgroundColor: "white", |
10 | | - }} |
11 | | - > |
12 | | - <div |
13 | | - style={{ |
14 | | - display: "flex", |
15 | | - flexDirection: "column", |
16 | | - justifyContent: "space-between", |
17 | | - color: "#6C63FF", |
18 | | - margin: "20px auto", |
19 | | - alignItems: "center", |
20 | | - fontFamily: "monospace", |
21 | | - }} |
22 | | - > |
23 | | - <NotFoundTitle>Error 404:</NotFoundTitle> |
24 | | - <h2>Dirección no encontrada.</h2> |
| 12 | + <Layout> |
| 13 | + <MainBg> |
| 14 | + <div |
| 15 | + style={{ |
| 16 | + display: "flex", |
| 17 | + flexDirection: "column", |
| 18 | + alignItems: "center", |
| 19 | + justifyContent: "center", |
| 20 | + minHeight: "60vh", |
| 21 | + textAlign: "center", |
| 22 | + gap: "20px", |
| 23 | + }} |
| 24 | + > |
| 25 | + <h1 |
| 26 | + style={{ |
| 27 | + fontSize: "4rem", |
| 28 | + fontWeight: "bold", |
| 29 | + color: "var(--accent)", |
| 30 | + }} |
| 31 | + > |
| 32 | + 404 |
| 33 | + </h1> |
| 34 | + <h2 style={{ fontSize: "2rem" }}>{t("title")}</h2> |
| 35 | + <p>{t("description")}</p> |
25 | 36 |
|
26 | | - <div style={{ maxWidth: "70%" }}> |
27 | | - <Image |
28 | | - src={ |
29 | | - "https://res.cloudinary.com/dcvnw6hvt/image/upload/v1739964161/elCronopio/404_bw_cli0yg.png" |
30 | | - } // Ruta de la imagen del autor |
31 | | - alt={"Un ovni llevándose a los usuarios de la pagina no encontrada"} // Texto alternativo |
32 | | - width={180} // Ancho de la imagen |
33 | | - height={180} // Alto de la imagen |
34 | | - // priority |
35 | | - // placeholder="blur" |
36 | | - // Make the image display full width |
| 37 | + <Link |
| 38 | + href="/" |
37 | 39 | style={{ |
38 | | - width: "100%", |
39 | | - height: "auto", |
| 40 | + padding: "10px 20px", |
| 41 | + backgroundColor: "var(--primary-btn-bg)", |
| 42 | + color: "white", |
| 43 | + borderRadius: "5px", |
| 44 | + textDecoration: "none", |
| 45 | + marginTop: "20px", |
40 | 46 | }} |
41 | | - /> |
| 47 | + > |
| 48 | + {t("backHome")} |
| 49 | + </Link> |
42 | 50 | </div> |
43 | | - <NotFoundText> |
44 | | - La dirección que has colocado no ha sido creada todavía. Verifica que |
45 | | - la hayas escrito bien, o vuelve a la página principal. |
46 | | - </NotFoundText> |
47 | | - <Link href="/">Regresar</Link> |
48 | | - {/* https://res.cloudinary.com/dcvnw6hvt/image/upload/v1739809759/elCronopio/xle8npibijpsgk9qkfnd.png */} |
49 | | - </div> |
50 | | - </Main> |
| 51 | + </MainBg> |
| 52 | + </Layout> |
51 | 53 | ); |
52 | 54 | } |
| 55 | +// import Link from "next/link"; |
| 56 | +// import { Main, NotFoundText, NotFoundTitle } from "../ui/ComponentsStyled"; |
| 57 | +// import Image from "next/image"; |
| 58 | + |
| 59 | +// export default function NotFound() { |
| 60 | +// return ( |
| 61 | +// <Main |
| 62 | +// style={{ |
| 63 | +// backgroundColor: "white", |
| 64 | +// }} |
| 65 | +// > |
| 66 | +// <div |
| 67 | +// style={{ |
| 68 | +// display: "flex", |
| 69 | +// flexDirection: "column", |
| 70 | +// justifyContent: "space-between", |
| 71 | +// color: "#6C63FF", |
| 72 | +// margin: "20px auto", |
| 73 | +// alignItems: "center", |
| 74 | +// fontFamily: "monospace", |
| 75 | +// }} |
| 76 | +// > |
| 77 | +// <NotFoundTitle>Error 404:</NotFoundTitle> |
| 78 | +// <h2>Dirección no encontrada.</h2> |
| 79 | + |
| 80 | +// <div style={{ maxWidth: "70%" }}> |
| 81 | +// <Image |
| 82 | +// src={ |
| 83 | +// "https://res.cloudinary.com/dcvnw6hvt/image/upload/v1739964161/elCronopio/404_bw_cli0yg.png" |
| 84 | +// } // Ruta de la imagen del autor |
| 85 | +// alt={"Un ovni llevándose a los usuarios de la pagina no encontrada"} // Texto alternativo |
| 86 | +// width={180} // Ancho de la imagen |
| 87 | +// height={180} // Alto de la imagen |
| 88 | +// // priority |
| 89 | +// // placeholder="blur" |
| 90 | +// // Make the image display full width |
| 91 | +// style={{ |
| 92 | +// width: "100%", |
| 93 | +// height: "auto", |
| 94 | +// }} |
| 95 | +// /> |
| 96 | +// </div> |
| 97 | +// <NotFoundText> |
| 98 | +// La dirección que has colocado no ha sido creada todavía. Verifica que |
| 99 | +// la hayas escrito bien, o vuelve a la página principal. |
| 100 | +// </NotFoundText> |
| 101 | +// <Link href="/">Regresar</Link> |
| 102 | +// {/* https://res.cloudinary.com/dcvnw6hvt/image/upload/v1739809759/elCronopio/xle8npibijpsgk9qkfnd.png */} |
| 103 | +// </div> |
| 104 | +// </Main> |
| 105 | +// ); |
| 106 | +// } |
0 commit comments