From f10b946fe17132f622fd2171684b101991770807 Mon Sep 17 00:00:00 2001 From: Christian Arevalo Date: Sun, 24 Sep 2023 04:53:45 -0500 Subject: [PATCH] :globe_with_meridians: Implementing i18n in events-page --- package.json | 3 +- src/assets/i18n/en.json | 10 + src/assets/i18n/es.json | 10 + src/components/events/GetTicketCard.tsx | 4 +- src/components/home/Events.tsx | 7 +- src/components/home/MiddleSections.tsx | 2 - src/components/shared/Footer.tsx | 1 + src/components/shared/Loader.tsx | 27 + src/pages/events/[id]/index.tsx | 191 +- src/pages/index.tsx | 12 - yarn.lock | 2225 ++--------------------- 11 files changed, 328 insertions(+), 2164 deletions(-) create mode 100644 src/components/shared/Loader.tsx diff --git a/package.json b/package.json index e2d4587..fc3fa78 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-i18next": "^13.2.2", + "react-loader-spinner": "^5.4.5", "swiper": "^10.2.0", "tailwindcss": "3.3.3", "viem": "^1.12.1", @@ -54,4 +55,4 @@ "url": "^0.11.0", "webpack-bundle-analyzer": "^4.9.0" } -} \ No newline at end of file +} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index efb16b9..60dba81 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -107,5 +107,15 @@ "not-found": "This page was not found", "error-code": "Error code", "home": "Go back home" + }, + "toasts": { + "ticket-bought": { + "title": "Ticket was bought!", + "description": "The ticket was successfully bought." + }, + "failed": { + "title": "Transaction failed.", + "description": "The transaction failed. Try again." + } } } \ No newline at end of file diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 06c42e7..905d493 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -107,5 +107,15 @@ "not-found": "Esta página no fue encontrada", "error-code": "Código de error", "home": "Volver al inicio" + }, + "toasts": { + "ticket-bought": { + "title": "Tiquete comprado!", + "description": "El tiquete fue comprado exitosamente." + }, + "failed": { + "title": "Transaction failed.", + "description": "La transacción falló. Intenta de nuevo" + } } } \ No newline at end of file diff --git a/src/components/events/GetTicketCard.tsx b/src/components/events/GetTicketCard.tsx index b0cd9ca..3493af3 100644 --- a/src/components/events/GetTicketCard.tsx +++ b/src/components/events/GetTicketCard.tsx @@ -34,13 +34,13 @@ const GetTicketCard = (props: Props) => { justifyContent={'center'} > - ¡GRATIS! + GRATIS • Quedan 7 cupos {hasTicket ? (