aboutsummaryrefslogtreecommitdiffstats
path: root/src/views/Chores
diff options
context:
space:
mode:
authorLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-15 21:58:23 -0400
committerLibravatar Mo Tarbin <mhed.t91@gmail.com>2024-07-16 01:58:23 -0400
commit93512eb6665e7d35660db133319be54ed1c09232 (patch)
tree302713f07ccba50de202d1ffc44fee47ac2fad91 /src/views/Chores
parent7a490116b70894ce00e71c7dd0c9dc71f8b72a5a (diff)
downloaddonetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.tar.gz
donetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.tar.bz2
donetick-frontend-93512eb6665e7d35660db133319be54ed1c09232.zip
Update Chore view
Diffstat (limited to '')
-rw-r--r--src/views/Chores/ChoreCard.jsx10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/views/Chores/ChoreCard.jsx b/src/views/Chores/ChoreCard.jsx
index 08a5406..6edcbd3 100644
--- a/src/views/Chores/ChoreCard.jsx
+++ b/src/views/Chores/ChoreCard.jsx
@@ -38,7 +38,7 @@ import moment from 'moment'
import React, { useEffect } from 'react'
import { useNavigate } from 'react-router-dom'
import { API_URL } from '../../Config'
-import { MarkChoreComplete } from '../../utils/Fetcher'
+import { MarkChoreComplete, SkipChore } from '../../utils/Fetcher'
import { Fetch } from '../../utils/TokenManager'
import ConfirmationModal from '../Modals/Inputs/ConfirmationModal'
import DateModal from '../Modals/Inputs/DateModal'
@@ -521,13 +521,7 @@ const ChoreCard = ({
</MenuItem>
<MenuItem
onClick={() => {
- Fetch(`${API_URL}/chores/${chore.id}/skip`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify({}),
- }).then(response => {
+ SkipChore(chore.id).then(response => {
if (response.ok) {
response.json().then(data => {
const newChore = data.res