From c153a4ff423d6f5ab9ad753630ec0253a2dbe9ce Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Fri, 27 Sep 2024 20:00:48 +0200 Subject: [PATCH 1/3] [~] Because animating is fun. --- package-lock.json | 7 +++++++ package.json | 1 + src/components/serverCards/DefaultServerCard.jsx | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce0d535..2591f35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@testing-library/react": "^16.0.0", "@types/jest": "^29.5.12", "@types/node": "^20.14.9", + "animate.css": "^4.1.1", "firebase": "^10.12.2", "jest": "^29.7.0", "prop-types": "^15.8.1", @@ -4038,6 +4039,12 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/animate.css": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/animate.css/-/animate.css-4.1.1.tgz", + "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==", + "license": "MIT" + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", diff --git a/package.json b/package.json index 2ed23ab..78847e1 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@testing-library/react": "^16.0.0", "@types/jest": "^29.5.12", "@types/node": "^20.14.9", + "animate.css": "^4.1.1", "firebase": "^10.12.2", "jest": "^29.7.0", "prop-types": "^15.8.1", diff --git a/src/components/serverCards/DefaultServerCard.jsx b/src/components/serverCards/DefaultServerCard.jsx index 224d5f5..a5de22b 100644 --- a/src/components/serverCards/DefaultServerCard.jsx +++ b/src/components/serverCards/DefaultServerCard.jsx @@ -5,6 +5,7 @@ import fabric from '../../assets/frameworks/fabric.png'; import forge from '../../assets/frameworks/forge.png'; import PropTypes from "prop-types"; import { FaTrash } from 'react-icons/fa'; +import 'animate.css/animate.min.css'; const ServerCard = ({ status, version, name, framework, onRunClick, onStopClick, onDeleteClick, countPlayers, maxPlayers, favoriteServer }) => { @@ -50,8 +51,8 @@ const ServerCard = ({ status, version, name, framework, onRunClick, onStopClick, return (
From c08e33da71b6cc911320419074fe4c811c4a4033 Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Fri, 27 Sep 2024 20:07:59 +0200 Subject: [PATCH 2/3] [~] 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 From a4295da409a640cdb2228c620515486016017580 Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Fri, 27 Sep 2024 20:15:42 +0200 Subject: [PATCH 3/3] =?UTF-8?q?[~]=20Pour=20le=20c=C3=B4t=C3=A9=20pro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/serverCards/DefaultServerCard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/serverCards/DefaultServerCard.jsx b/src/components/serverCards/DefaultServerCard.jsx index a5de22b..c5754e2 100644 --- a/src/components/serverCards/DefaultServerCard.jsx +++ b/src/components/serverCards/DefaultServerCard.jsx @@ -52,7 +52,7 @@ const ServerCard = ({ status, version, name, framework, onRunClick, onStopClick, return (