17/01/2023 - 20h
parent
d5b1de0807
commit
7e87ca2741
|
@ -36,6 +36,7 @@ import UserSignFirst from "./pages/usersigninfirst";
|
|||
import GestionAdministrative from "./components/GestionAdministrative";
|
||||
import Emargement from "./pages/emargementOk";
|
||||
import Formation_Cartouche_Com from "./pages/recherche_cartouche_com";
|
||||
import SeDesabonner from './pages/sedesabonner';
|
||||
|
||||
function App() {
|
||||
|
||||
|
@ -93,6 +94,7 @@ function App() {
|
|||
<Route path="/Emargement/" exact component={Emargement} />
|
||||
<Route path="/CartoucheComMySy/" exact component={Formation_Cartouche_Com} />
|
||||
<Route path="/Recherche_new_v2/" exact component={Recherche_new_v2} />
|
||||
<Route path="/unsubscribe/" exact component={SeDesabonner} />
|
||||
|
||||
<Route component={NotFound} />
|
||||
</Switch>
|
||||
|
|
|
@ -0,0 +1,252 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import { useForm } from 'react-hook-form';
|
||||
import Navigation from "../components/Navigation";
|
||||
import { Helmet } from "react-helmet";
|
||||
import bannerimg2 from "../mysy_img/MYSY-LOGO-BLUE.png";
|
||||
import 'react-toastify/dist/ReactToastify.min.css';
|
||||
import axios from "axios";
|
||||
import { Button, } from "reactstrap";
|
||||
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
|
||||
import { SocialIcon } from 'react-social-icons';
|
||||
import ousommesnousimg from "../mysy_img/mysy_training_technology_ici.png"
|
||||
import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png";
|
||||
import Footer from "./Fotter";
|
||||
import Header from "./Header";
|
||||
import SendIcon from '@mui/icons-material/Send';
|
||||
|
||||
const Sedesabonner = () => {
|
||||
|
||||
const [country_code, setcountry_code] = useState("");
|
||||
const [country_name, setcountry_name] = useState("");
|
||||
const [city, setcity] = useState("");
|
||||
const [postal, setpostal] = useState("");
|
||||
const [latitude, setlatitude] = useState("");
|
||||
const [longitude, setlongitude] = useState("");
|
||||
const [IPv4, setIPv4] = useState("");
|
||||
const [state, setstate] = useState("");
|
||||
const [userIp, setuserIp] = useState("");
|
||||
const [mynote, setmynote] = useState(0);
|
||||
const [usermessage, setusermessage] = useState("");
|
||||
const [object, setobject] = useState("");
|
||||
const [result, setResult] = useState("");
|
||||
const [myApiResponse, setmyApiResponse] = useState("");
|
||||
|
||||
|
||||
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
reset,
|
||||
formState: { errors }
|
||||
} = useForm();
|
||||
|
||||
const onSubmit = async (data) => {
|
||||
const { email, } = data;
|
||||
|
||||
Desabonnement();
|
||||
};
|
||||
|
||||
const [Desabonnement_api, setDesabonnement_api] = useState("");
|
||||
const [Desabonnement_message, setDesabonnement_message] = useState("");
|
||||
const [Desabonnement_result, setDesabonnement_result] = useState("");
|
||||
function Desabonnement(e) {
|
||||
var mysender_email = document.getElementsByName("email")[0].value;
|
||||
|
||||
var re = /\S+@\S+\.\S+/;
|
||||
if (re.test(mysender_email) == false) {
|
||||
alert("l'email est incorrecte");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Sedesabonner/";
|
||||
var form = new FormData();
|
||||
form.append("email", mysender_email);
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("false")) {
|
||||
//console.log(" In test res.data.status = " + res.data.status);
|
||||
//console.log(" In test res.data.message = " + res.data.message);
|
||||
setDesabonnement_api("false");
|
||||
}
|
||||
|
||||
else if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In test res.data.status (true) = " + res.data.status);
|
||||
//console.log(" In test res.data.message = " + res.data.message);
|
||||
|
||||
setDesabonnement_api("true");
|
||||
setDesabonnement_message(res.data.message);
|
||||
window.setTimeout(function() {
|
||||
window.location.href = process.env.REACT_APP_BASE_URL
|
||||
}, 7000);
|
||||
|
||||
}
|
||||
else {
|
||||
//console.log(" contact-nous statut = " + res.data.status);
|
||||
//console.log(" contact-nous res.data.message = " + res.data.message);
|
||||
setDesabonnement_api("false");
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.warn('contact-nous Not good man :( mysearchtext = ', error);
|
||||
setDesabonnement_api("false");
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div className='ContactForm'>
|
||||
<Helmet>
|
||||
<title>MySy Training, Se désabonner </title>
|
||||
<meta name="description" content="Trouver des formations et tutoriels adapté à vos besoins" />
|
||||
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="title" content="MySy Training, contactez-nous" />
|
||||
<link rel="canonical" href={`${process.env.REACT_APP_BASE_URL}` + "/ContactezNous"} />
|
||||
</Helmet>
|
||||
|
||||
<Header />
|
||||
|
||||
|
||||
<div className="div_mobile">
|
||||
<div> <br /></div>
|
||||
<div className="titre"> Se désabonner </div>
|
||||
<div className='container'>
|
||||
<div className='row'>
|
||||
<div className='col-12 text-center'>
|
||||
<div className='contactForm'>
|
||||
<form id='contact-form' onSubmit={handleSubmit(onSubmit)} noValidate>
|
||||
{/* Row 1 of form */}
|
||||
<div className='row formRow'>
|
||||
|
||||
<div className='col-12'>
|
||||
<input
|
||||
type='email'
|
||||
name='email'
|
||||
id='email'
|
||||
{...register('email', {
|
||||
required: true,
|
||||
pattern: /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
|
||||
})}
|
||||
className='form-control formInput'
|
||||
placeholder='Adresse email'
|
||||
></input>
|
||||
{errors.email && (
|
||||
<span className='errorMessage'>Adresse email invalide</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{/* Row 2 of form */}
|
||||
|
||||
{/* Row 3 of form */}
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<br />
|
||||
<Button variant="contained" color="success" type='submit'
|
||||
className="div_row22 btn_login button" style={{"width":"100%"}}
|
||||
>Confirmer {<SendIcon />}</Button>
|
||||
</form>
|
||||
<br />
|
||||
{String(Desabonnement_api) === String("true") && <div className="okUpdateData">
|
||||
Votre demande a bien été prise en compte. Elle sera traitée dans 24h. <br/>
|
||||
Vous allez être redirigé vers la page d'accueil.
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{String(Desabonnement_api) === String("false") && <div className="koUpdateData">
|
||||
Impossible de traiter votre demande. Merci de ressayer dans un instant.
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<br/>
|
||||
<div className="div_row" >
|
||||
<div className="nom_prenom">Où nous trouver ? </div>
|
||||
|
||||
<div className="div_carte">
|
||||
<a target="_blank"
|
||||
href="https://www.google.com/maps/place/MySy+Training+Technology/@48.8761591,2.3260624,15z/data=!4m5!3m4!1s0x0:0x8239ba23406c9699!8m2!3d48.8761591!4d2.3260624">
|
||||
<img src={ousommesnousimg} alt="logo MySy Technology ou sommes nous" style={{ 'width': "100%", 'height': '50%' }} />
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_adresse" >
|
||||
<br />
|
||||
<div>MySy Training Technology<br />
|
||||
</div>
|
||||
<div style={{ fontSize: "small" }}>
|
||||
|
||||
Adresse : 1 Cr du Havre, 75008 Paris <br />
|
||||
Adresse email :
|
||||
<a href="mailto: contact@mysy-training.com?subject=Mail from mysy website" target="_blank"> contact@mysy-training.com</a> <br />
|
||||
|
||||
Téléphone fixe : +331 77 00 38 57<br />
|
||||
Téléphone : +337 69 20 39 45<br />
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div> Sur nos reseaux sociaux
|
||||
|
||||
<div style={{ 'float': "center", "textAlign": "center" }}>
|
||||
<div className="media_sociaux">
|
||||
<FacebookShareButton
|
||||
url={"https://www.facebook.com/MySy-Training-114572794561371/"}
|
||||
>
|
||||
<SocialIcon network="facebook" className="SocialIcon" />
|
||||
</FacebookShareButton>
|
||||
|
||||
|
||||
<TwitterShareButton
|
||||
url={"https://twitter.com/mysy_training"}
|
||||
hashtag={"#MySyTraining"}
|
||||
>
|
||||
<SocialIcon network="twitter" className="SocialIcon" />
|
||||
</TwitterShareButton>
|
||||
|
||||
|
||||
<LinkedinShareButton
|
||||
url={"https://www.linkedin.com/c"}
|
||||
summary={"ee"}
|
||||
source={"https://www.linkedin.com/in/mysy-training-96b53a237/"}
|
||||
|
||||
>
|
||||
<SocialIcon network="linkedin" className="SocialIcon" />
|
||||
</LinkedinShareButton>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="pieddepage">
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Sedesabonner;
|
|
@ -0,0 +1,20 @@
|
|||
import SeDesabonner from "../components/Sedesabonner";
|
||||
import Navigation from "../components/Navigation";
|
||||
|
||||
const recherche_draft = () => {
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Navigation />
|
||||
<div>
|
||||
<SeDesabonner />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default recherche_draft;
|
|
@ -4,7 +4,7 @@
|
|||
font-size: 0.1rem;
|
||||
}
|
||||
|
||||
.formRow{
|
||||
.formRow {
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@
|
|||
.div_mobile {
|
||||
position: relative;
|
||||
|
||||
top: 7rem;
|
||||
top: 5rem;
|
||||
z-index: 1;
|
||||
width: 98%;
|
||||
height: 100%;
|
||||
|
@ -186,6 +186,42 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
.titre {
|
||||
width: 99%;
|
||||
margin-left: 5px;
|
||||
|
||||
padding-top: 10px;
|
||||
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
line-height: 38px;
|
||||
/* identical to box height */
|
||||
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
|
||||
/* Deep Blue */
|
||||
|
||||
color: #0A043C;
|
||||
|
||||
|
||||
/* Inside auto layout */
|
||||
|
||||
flex: none;
|
||||
order: 0;
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.col-6 {
|
||||
flex: 0 0 auto;
|
||||
width: 100%;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||
|
@ -222,6 +258,7 @@
|
|||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.img_gauche_taille {
|
||||
max-width: 50%;
|
||||
}
|
||||
|
@ -250,6 +287,7 @@
|
|||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.div_row2 {
|
||||
float: left;
|
||||
//border:0px solid black;
|
||||
|
@ -375,6 +413,37 @@
|
|||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.titre {
|
||||
width: 99%;
|
||||
margin-left: 5px;
|
||||
height: 80px;
|
||||
padding-top: 10px;
|
||||
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
line-height: 38px;
|
||||
/* identical to box height */
|
||||
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
|
||||
/* Deep Blue */
|
||||
|
||||
color: #0A043C;
|
||||
|
||||
|
||||
/* Inside auto layout */
|
||||
|
||||
flex: none;
|
||||
order: 0;
|
||||
flex-grow: 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||
|
@ -409,6 +478,7 @@
|
|||
margin-bottom: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.okUpdateData {
|
||||
font-size: medium;
|
||||
color: green;
|
||||
|
@ -560,6 +630,37 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
|
||||
.titre {
|
||||
width: 99%;
|
||||
margin-left: 5px;
|
||||
height: 80px;
|
||||
padding-top: 10px;
|
||||
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 40px;
|
||||
line-height: 48px;
|
||||
/* identical to box height */
|
||||
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
|
||||
/* Deep Blue */
|
||||
|
||||
color: #0A043C;
|
||||
|
||||
|
||||
/* Inside auto layout */
|
||||
|
||||
flex: none;
|
||||
order: 0;
|
||||
flex-grow: 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
|
@ -747,5 +848,30 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
|
||||
.titre {
|
||||
height: 80px;
|
||||
padding-top: 10px;
|
||||
|
||||
font-family: 'Albert Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 40px;
|
||||
line-height: 48px;
|
||||
|
||||
text-align: center;
|
||||
letter-spacing: 1px;
|
||||
|
||||
/* Deep Blue */
|
||||
|
||||
color: #0A043C;
|
||||
|
||||
|
||||
/* Inside auto layout */
|
||||
|
||||
flex: none;
|
||||
order: 0;
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -61,3 +61,4 @@
|
|||
@import "./components/reherche_new_v2";
|
||||
@import "./components/footer_v2";
|
||||
@import "./components/displaydetailclass_new_v2";
|
||||
@import "./components/sedesabonner";
|
Loading…
Reference in New Issue