import React, { useEffect } from 'react' //import * as filestack from 'filestack-js'; import { Button } from 'reactstrap'; import { useTranslation } from 'react-i18next'; import JKModalDialog from '../common/JKModalDialog'; import JKProfileAvatar from './JKProfileAvatar'; import { useAuth } from '../../context/UserAuth'; import { getUserDetail } from '../../helpers/rest'; const JKProfileAvatarUpload = ({show, toggle}) => { const { t } = useTranslation('profile'); const { currentUser } = useAuth(); useEffect(() => { if(currentUser) { console.log(currentUser.photo_url); // getUserDetail(currentUser.id).then(response => { // console.log('_userDetails', response); // }); } }, [currentUser]); const openFilePicker = () => { // const client = filestack.init(window.gon.fp_apikey); // client.picker({ // accept: 'image/*', // maxFiles: 1, // onFileUploadFinished: (response) => { // console.log(response); // } // }).open(); } return (
) } export default JKProfileAvatarUpload