diff options
author | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-05 17:28:47 -0400 |
---|---|---|
committer | Mo Tarbin <mhed.t91@gmail.com> | 2024-07-05 17:28:47 -0400 |
commit | c34da50c8c1564c9c6556522bf12a93639c1f160 (patch) | |
tree | 22690c5d8efe866f3f97bf479115d6914f579824 /src/views/Chores | |
parent | 71bad5a19f8aea358b3f21dde4f69fd53a870184 (diff) | |
download | donetick-frontend-c34da50c8c1564c9c6556522bf12a93639c1f160.tar.gz donetick-frontend-c34da50c8c1564c9c6556522bf12a93639c1f160.tar.bz2 donetick-frontend-c34da50c8c1564c9c6556522bf12a93639c1f160.zip |
Add NFC tag writing functionality to ChoreCard component, Add Email to sign up
Diffstat (limited to 'src/views/Chores')
-rw-r--r-- | src/views/Chores/ChoreCard.jsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/views/Chores/ChoreCard.jsx b/src/views/Chores/ChoreCard.jsx index 8efaf04..ee25458 100644 --- a/src/views/Chores/ChoreCard.jsx +++ b/src/views/Chores/ChoreCard.jsx @@ -8,6 +8,7 @@ import { ManageSearch, MoreTime, MoreVert, + Nfc, NoteAdd, RecordVoiceOver, Repeat, @@ -34,6 +35,7 @@ import moment from 'moment' import React, { useEffect } from 'react' import { useNavigate } from 'react-router-dom' import { API_URL } from '../../Config' +import writeToNFC from '../../service/NFCWriter' import { Fetch } from '../../utils/TokenManager' import ConfirmationModal from '../Modals/Inputs/ConfirmationModal' import DateModal from '../Modals/Inputs/DateModal' @@ -518,6 +520,15 @@ const ChoreCard = ({ chore, performers, onChoreUpdate, onChoreRemove, sx }) => { <MoreTime /> Change due date </MenuItem> + <MenuItem + onClick={() => { + // write current chore URL to NFC + writeToNFC(`${window.location.origin}/chores/${chore.id}`) + }} + > + <Nfc /> + Write to NFC + </MenuItem> <MenuItem onClick={handleEdit}> <Edit /> Edit |