From df0be4dec4bf520abcc2a15630fdd561e3185386 Mon Sep 17 00:00:00 2001 From: cherif Date: Tue, 11 Apr 2023 18:06:30 +0200 Subject: [PATCH] 11/04/23 - 18h --- src/components/TestUrl.js | 80 +++++++++++++++++--------- src/styles/components/_test_page2.scss | 27 +++++++++ 2 files changed, 79 insertions(+), 28 deletions(-) diff --git a/src/components/TestUrl.js b/src/components/TestUrl.js index 9628a99..1f7f131 100644 --- a/src/components/TestUrl.js +++ b/src/components/TestUrl.js @@ -63,7 +63,6 @@ const TestUrl = (props) => { const elements = useElements(); const [message, setMessage] = useState(null); - const [isLoading, setIsLoading] = useState(false); const options = { // passing the client secret obtained from the server @@ -224,6 +223,7 @@ const TestUrl = (props) => { const [phoneNumber, setphoneNumber] = useState("") const { classId } = useParams(); + const [pokemon, setPokemon] = useState(); const location = useLocation(); useEffect(() => { @@ -850,11 +850,30 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa window.close(); } - function finaliser(){ + function finaliser() { window.open( "/", '_self' - ); + ); + } + + const [isLoading, setLoading] = useState(); + + + function loading() { + + setLoading(true); + setTimeout(() => { // simulate a delay + axios.get("https://pokeapi.co/api/v2/pokemon/1") + .then((response) => { + + // Get pokemon data + setPokemon(response.data); //set pokemon state + setLoading(false); //set loading state + }); + }, 5000); + + } return ( @@ -873,8 +892,13 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa

cartouche formaion

+
+ {isLoading &&
+
loading in processsss
+
} +

payement strip

@@ -990,38 +1014,38 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
-
-
-
- Mysy Training Logo -
+
+
+
+ Mysy Training Logo +
-
- Cherif BALDE
+
+ Cherif BALDE
+
+
+ Directeur +
-
- Directeur +
+
+ + +
+ +
+
 +337 69 20 39 45
+
 +331 77 00 38 57
+
 cbalde@mysy-training.com
+
 https://www.mysy-training.com/
+
 +337 69 20 39 45
+
-
-
- -
- -
-
 +337 69 20 39 45
-
 +331 77 00 38 57
-
 cbalde@mysy-training.com
-
 https://www.mysy-training.com/
-
 +337 69 20 39 45
- -
-
- {/* diff --git a/src/styles/components/_test_page2.scss b/src/styles/components/_test_page2.scss index eb6d80c..6e2b263 100644 --- a/src/styles/components/_test_page2.scss +++ b/src/styles/components/_test_page2.scss @@ -2,6 +2,33 @@ .tox-statusbar__branding { display: none !important; } + + +.loader-container { + width: 100%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + position: fixed; + background: rgba(0, 0, 0, 0.834); + z-index: 1; + top: 0px; + opacity: 80%; +} + +.spinner { + width:20rem; + height: 10rem; + border: 8px solid; + border-color: #3d5af1 transparent #3d5af1 transparent; + border-radius: 50%; + animation: spin-anim 1.2s linear infinite; + background-color: red; + color: black; +} + + @media only screen and (min-width: 1200px) {