aboutsummaryrefslogtreecommitdiffstats
path: root/src/views/Chores
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/Chores')
-rw-r--r--src/views/Chores/ChoreCard.jsx11
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