From c34da50c8c1564c9c6556522bf12a93639c1f160 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Fri, 5 Jul 2024 17:28:47 -0400 Subject: Add NFC tag writing functionality to ChoreCard component, Add Email to sign up --- src/views/Chores/ChoreCard.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/views/Chores') 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 }) => { Change due date + { + // write current chore URL to NFC + writeToNFC(`${window.location.origin}/chores/${chore.id}`) + }} + > + + Write to NFC + Edit -- cgit