import React, { useState } from 'react'; import '../Pages/Profile.css' import dl from '../res/icon/download.png' import defaultImg from '../res/img/Person.png' import { useAuth } from '../Contexts/AuthContext'; //@ts-ignore const ProfilePDP = ({ player}) => { const [selectedFile, setSelectedFile] = useState(null); const {user} = useAuth() console.log(user) // @ts-ignores const handleFileChange = (event) => { let file = event.target.files[0]; setSelectedFile(file); if (file) { const pdpUrl = URL.createObjectURL(file); if (user!=null){ user.profilePicture = pdpUrl } } }; //! gitans ? if (user == null){ console.log("duuude"); } console.log(user) return (
Selected File: {selectedFile.name}
*/}Taille recommandée : 100px