|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import { Component } from '@fullcalendar/core';
|
|
|
|
|
import { render } from '@testing-library/react';
|
|
|
|
|
import { click } from '@testing-library/user-event/dist/click';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import NavigationDashboard from '../components/NavigationDashboard';
|
|
|
|
@ -16,12 +18,12 @@ const Compte = () => {
|
|
|
|
|
<h2 className="titre">Mon Compte</h2>
|
|
|
|
|
<div className="rechLogo">
|
|
|
|
|
<div className="input_box">
|
|
|
|
|
<input type="search" placeholder="Rechercher..."/>
|
|
|
|
|
<input type="search" placeholder="Rechercher..." />
|
|
|
|
|
<span className="search">
|
|
|
|
|
<i class="uil uil-search search-icon"></i>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<img className="logo" srcSet="./LogoApp.svg"/>
|
|
|
|
|
<img className="logo" srcSet="./LogoApp.svg" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="bas_de_page">
|
|
|
|
@ -31,7 +33,7 @@ const Compte = () => {
|
|
|
|
|
<div className="picture">
|
|
|
|
|
<div id="display_image"></div>
|
|
|
|
|
<div className='bouton_submit'>
|
|
|
|
|
<input type="file" name="fileUpload" id="fileUpload"/>
|
|
|
|
|
<input type="file" name="fileUpload" id="fileUpload" accept="image/*"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="name">
|
|
|
|
@ -79,30 +81,8 @@ const Compte = () => {
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
let fileUpload = document.getElementById("fileUpload");
|
|
|
|
|
let display_image = document.getElementById("display_image");
|
|
|
|
|
|
|
|
|
|
//preview();
|
|
|
|
|
|
|
|
|
|
function preview(){
|
|
|
|
|
display_image.innerHTML = "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for(fileUpload of fileUpload.files){
|
|
|
|
|
let reader = new FileReader();
|
|
|
|
|
let figure = document.createElement("figure");
|
|
|
|
|
let figCap = document.createElement("figcaption");
|
|
|
|
|
figCap.innerText = fileUpload.name;
|
|
|
|
|
figure.appendChild(figCap);
|
|
|
|
|
reader.onload=()=>{
|
|
|
|
|
let img = document.createElement("img");
|
|
|
|
|
img.setAttribute("src", reader.result);
|
|
|
|
|
figure.insertBefore(img,figCap);
|
|
|
|
|
}
|
|
|
|
|
display_image.appendChild(figure);
|
|
|
|
|
reader.readAsDataURL(fileUpload);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Compte;
|