From c08e33da71b6cc911320419074fe4c811c4a4033 Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Fri, 27 Sep 2024 20:07:59 +0200 Subject: [PATCH] [~] Fixed 'payements' redirections issues --- src/App.jsx | 12 ++++++------ src/pages/CreateServer/CreateServer.jsx | 6 +++--- src/pages/DashboardPage/DashboardPage.jsx | 10 +++++----- src/pages/{Payement => Payment}/Checkout.jsx | 0 .../PaymentForm/PaymentForm.jsx | 0 .../PaymentForm/PaymentForm.module.scss | 0 src/pages/{Payement => Payment}/Pricing/Pricing.jsx | 0 .../Pricing/Pricing.module.scss | 0 8 files changed, 14 insertions(+), 14 deletions(-) rename src/pages/{Payement => Payment}/Checkout.jsx (100%) rename src/pages/{Payement => Payment}/PaymentForm/PaymentForm.jsx (100%) rename src/pages/{Payement => Payment}/PaymentForm/PaymentForm.module.scss (100%) rename src/pages/{Payement => Payment}/Pricing/Pricing.jsx (100%) rename src/pages/{Payement => Payment}/Pricing/Pricing.module.scss (100%) diff --git a/src/App.jsx b/src/App.jsx index 433a668..0c7e8b5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -5,9 +5,9 @@ import 'react-toastify/dist/ReactToastify.css'; import { auth, getUserSubscription } from './service/firebase'; import styles from './App.module.scss'; import Loading from './pages/Loading/loading'; -import Pricing from './pages/Payement/Pricing/Pricing'; -import PaymentForm from './pages/Payement/PaymentForm/PaymentForm'; -import Checkout from './pages/Payement/Checkout'; +import Pricing from './pages/Payment/Pricing/Pricing'; +import PaymentForm from './pages/Payment/PaymentForm/PaymentForm'; +import Checkout from './pages/Payment/Checkout'; const LoginPage = lazy(() => import('./pages/LoginPage/LoginPage')); const ServerDetails = lazy(() => import('./pages/ServerDetails/ServerDetails')); @@ -82,9 +82,9 @@ const App = () => { : } /> {/* Routes with Subscription Levels */} - 0 ? : ) : } /> - 1 ? : ) : } /> - 2 ? : ) : } /> + 0 ? : ) : } /> + 1 ? : ) : } /> + 2 ? : ) : } /> {/* Server Details Route */} : } /> diff --git a/src/pages/CreateServer/CreateServer.jsx b/src/pages/CreateServer/CreateServer.jsx index 4b4ef32..44d6582 100644 --- a/src/pages/CreateServer/CreateServer.jsx +++ b/src/pages/CreateServer/CreateServer.jsx @@ -38,21 +38,21 @@ const CreateServer = ({ user }) => {
Création du serveur
De quelle façon voulez-vous jouer ?
-
(subscription > 0) ? navigate('/CreateServer/java') : navigate('/payement?package=Gratuit')}> +
(subscription > 0) ? navigate('/CreateServer/java') : navigate('/payment?package=Gratuit')}> Java Edition
Java Edition
Découvrez la version classique de Minecraft sur PC, avec un large éventail de mises à jour et de fonctionnalités, couvrant plus de vingt versions !
-
(subscription > 1) ? navigate('/CreateServer/bedrock') : navigate('/payement?package=Standard')}> +
(subscription > 1) ? navigate('/CreateServer/bedrock') : navigate('/payment?package=Standard')}> Mini-jeu
Mini-jeu
Plongez dans Minecraft avec des cartes personnalisées et des règles uniques, en solo ou avec vos amis.
-
(subscription > 2) ? navigate('/CreateServer/modpack') : navigate('/payement?package=Premium')}> +
(subscription > 2) ? navigate('/CreateServer/modpack') : navigate('/payment?package=Premium')}> Minecraft Modé
Minecraft Modé
Explorez la version modifiée de Minecraft sur PC, avec des modpacks riches et variés, contenant plus de 200 mods pour une expérience de jeu personnalisée.
diff --git a/src/pages/DashboardPage/DashboardPage.jsx b/src/pages/DashboardPage/DashboardPage.jsx index 2b030cc..49ad4c7 100644 --- a/src/pages/DashboardPage/DashboardPage.jsx +++ b/src/pages/DashboardPage/DashboardPage.jsx @@ -62,12 +62,12 @@ const DashboardPage = ({ user }) => { try { if (subscription === 0) { if (framework === "paper") { - navigate('/payement?package=Gratuit'); + navigate('/payment?package=Gratuit'); } if (framework === "Bedrock") { - navigate('/payement?package=Standard'); + navigate('/payment?package=Standard'); } else { - navigate('/payement?package=Standard'); + navigate('/payment?package=Standard'); } } @@ -76,7 +76,7 @@ const DashboardPage = ({ user }) => { await serviiApi.serverRun(serverName); updateServersFromApi(); } else { - navigate('/payement?package=Standard'); + navigate('/payment?package=Standard'); } } else if (subscription === 2) { @@ -84,7 +84,7 @@ const DashboardPage = ({ user }) => { await serviiApi.serverRun(serverName); updateServersFromApi(); } else { - navigate('/payement?package=Premium'); + navigate('/payment?package=Premium'); } } else if (subscription === 3) { diff --git a/src/pages/Payement/Checkout.jsx b/src/pages/Payment/Checkout.jsx similarity index 100% rename from src/pages/Payement/Checkout.jsx rename to src/pages/Payment/Checkout.jsx diff --git a/src/pages/Payement/PaymentForm/PaymentForm.jsx b/src/pages/Payment/PaymentForm/PaymentForm.jsx similarity index 100% rename from src/pages/Payement/PaymentForm/PaymentForm.jsx rename to src/pages/Payment/PaymentForm/PaymentForm.jsx diff --git a/src/pages/Payement/PaymentForm/PaymentForm.module.scss b/src/pages/Payment/PaymentForm/PaymentForm.module.scss similarity index 100% rename from src/pages/Payement/PaymentForm/PaymentForm.module.scss rename to src/pages/Payment/PaymentForm/PaymentForm.module.scss diff --git a/src/pages/Payement/Pricing/Pricing.jsx b/src/pages/Payment/Pricing/Pricing.jsx similarity index 100% rename from src/pages/Payement/Pricing/Pricing.jsx rename to src/pages/Payment/Pricing/Pricing.jsx diff --git a/src/pages/Payement/Pricing/Pricing.module.scss b/src/pages/Payment/Pricing/Pricing.module.scss similarity index 100% rename from src/pages/Payement/Pricing/Pricing.module.scss rename to src/pages/Payment/Pricing/Pricing.module.scss