diff --git a/webclient/src/AdminMembers.js b/webclient/src/AdminMembers.js index 99d906b..79411a1 100644 --- a/webclient/src/AdminMembers.js +++ b/webclient/src/AdminMembers.js @@ -123,7 +123,7 @@ export function AdminMemberCards(props) { const [error, setError] = useState(false); const [loading, setLoading] = useState(false); const [success, setSuccess] = useState(false); - const [viewCard, setViewCard] = useState(false); + const [cardPhoto, setCardPhoto] = useState(false); const { id } = useParams(); useEffect(() => { @@ -155,6 +155,18 @@ export function AdminMemberCards(props) { }); }; + const getCardPhoto = (e) => { + e.preventDefault(); + requester('/members/' + id + '/card_photo/', 'GET', token) + .then(res => res.blob()) + .then(res => { + setCardPhoto(URL.createObjectURL(res)); + }) + .catch(err => { + console.log(err); + }); + }; + const makeProps = (name) => ({ name: name, onChange: handleChange, @@ -176,17 +188,17 @@ export function AdminMemberCards(props) {