File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed
src/Components/ErrorComponent Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 1+ import styled from "@emotion/styled" ;
2+ import { ErrorComponent } from "../../src/Components/ErrorComponent" ;
3+ import { TicketsLayout } from "../../src/Components/Layouts/TicketsLayout" ;
4+ import { TicketsQueryQuery } from "../../src/graphql/tickets.generated" ;
5+ import { ParseQuery } from "../../src/helpers/types" ;
6+ import { ViewportSizes } from "../../styles/theme" ;
7+
8+ type Page = ParseQuery < TicketsQueryQuery [ "page" ] > ;
9+
10+ export interface PageProps {
11+ seo : Page [ "seo" ] ;
12+ }
13+
14+ export const Container = styled . div `
15+ display: flex;
16+ flex-direction: column;
17+ padding-top: 8rem;
18+ padding-bottom: 8rem;
19+ gap: 3rem;
20+ transition: gap 250ms ease-in-out;
21+ @media (max-width: ${ ViewportSizes . Phone } px) {
22+ gap: 4rem;
23+ }
24+ @media (min-width: ${ ViewportSizes . TabletLandscape } px) {
25+ gap: 6rem;
26+ }
27+ @media (min-width: ${ ViewportSizes . Desktop } px) {
28+ gap: 6rem;
29+ }
30+ ` ;
31+
32+ export default function Tickets ( props : PageProps ) {
33+ return (
34+ < Container >
35+ < ErrorComponent
36+ errorMessage = { `No se pudo completar el pago de tu(s) ticket(s). Puede ser que tu tarjeta fuese declinada o que el procesador de pagos no pudiese comunicarse con tu institución bancaria. Porfavor intenta nuevamente. Si aun no funciona, ponte en contacto con nosotros.` }
37+ mainText = "Algo salio mal"
38+ textoDelBoton = "Navegar a /tickets"
39+ url = "/tickets"
40+ />
41+ </ Container >
42+ ) ;
43+ }
44+
45+ Tickets . getLayout = TicketsLayout ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ const ImageWrapper = styled.section`
3939` ;
4040const H1404 = styled ( H1 ) `
4141 font-size: 70px;
42+ text-align: center;
4243 @media (min-width: ${ ViewportSizes . Phone } px) {
4344 font-size: 120px;
4445 }
@@ -67,10 +68,14 @@ const Wrapper = styled.div`
6768
6869export const ErrorComponent = ( {
6970 errorMessage,
71+ textoDelBoton = "Volver al home" ,
72+ mainText = "OOPS!" ,
7073 url = "/" ,
7174} : {
7275 errorMessage : string ;
76+ mainText ?: string ;
7377 url ?: string ;
78+ textoDelBoton ?: string ;
7479} ) => {
7580 return (
7681 < StyledBlackWrapp >
@@ -80,10 +85,10 @@ export const ErrorComponent = ({
8085 alt = ""
8186 />
8287 </ ImageWrapper >
83- < H1404 > OOPS! </ H1404 >
88+ < H1404 > { mainText } </ H1404 >
8489 < Wrapper >
8590 < P > { errorMessage } </ P >
86- < PrimaryStyledLink href = { url } > Volver al home </ PrimaryStyledLink >
91+ < PrimaryStyledLink href = { url } > { textoDelBoton } </ PrimaryStyledLink >
8792 </ Wrapper >
8893 </ StyledBlackWrapp >
8994 ) ;
You can’t perform that action at this time.
0 commit comments