diff options
author | 2024-07-16 19:37:18 -0400 | |
---|---|---|
committer | 2024-07-16 19:37:18 -0400 | |
commit | 7f4e5928492a71135f6817874461c80a0ecc155c (patch) | |
tree | 1527356c61e0bc11e4fbc3d3d19bdf17d11596c9 /src/views/Chores | |
parent | 93512eb6665e7d35660db133319be54ed1c09232 (diff) | |
download | donetick-frontend-7f4e5928492a71135f6817874461c80a0ecc155c.tar.gz donetick-frontend-7f4e5928492a71135f6817874461c80a0ecc155c.tar.bz2 donetick-frontend-7f4e5928492a71135f6817874461c80a0ecc155c.zip |
Add SkipChore function to Fetcher utility module, Update Loading Comp
Diffstat (limited to 'src/views/Chores')
-rw-r--r-- | src/views/Chores/ChoreCard.jsx | 8 | ||||
-rw-r--r-- | src/views/Chores/MyChores.jsx | 16 |
2 files changed, 10 insertions, 14 deletions
diff --git a/src/views/Chores/ChoreCard.jsx b/src/views/Chores/ChoreCard.jsx index 6edcbd3..97e407a 100644 --- a/src/views/Chores/ChoreCard.jsx +++ b/src/views/Chores/ChoreCard.jsx @@ -17,6 +17,7 @@ import { SwitchAccessShortcut, TimesOneMobiledata, Update, + ViewCarousel, Webhook, } from '@mui/icons-material' import { @@ -107,6 +108,9 @@ const ChoreCard = ({ const handleEdit = () => { navigate(`/chores/${chore.id}/edit`) } + const handleView = () => { + navigate(`/chores/${chore.id}`) + } const handleDelete = () => { setConfirmModelConfig({ isOpen: true, @@ -579,6 +583,10 @@ const ChoreCard = ({ <Edit /> Edit </MenuItem> + <MenuItem onClick={handleView}> + <ViewCarousel /> + View + </MenuItem> <MenuItem onClick={handleDelete} color='danger'> <Delete /> Delete diff --git a/src/views/Chores/MyChores.jsx b/src/views/Chores/MyChores.jsx index cd90942..d4eed5a 100644 --- a/src/views/Chores/MyChores.jsx +++ b/src/views/Chores/MyChores.jsx @@ -3,7 +3,6 @@ import { Badge, Box, Checkbox, - CircularProgress, Container, IconButton, Input, @@ -18,8 +17,8 @@ import Fuse from 'fuse.js' import { useContext, useEffect, useRef, useState } from 'react' import { useNavigate } from 'react-router-dom' import { UserContext } from '../../contexts/UserContext' -import Logo from '../../Logo' import { GetAllUsers, GetChores, GetUserProfile } from '../../utils/Fetcher' +import LoadingComponent from '../components/Loading' import ChoreCard from './ChoreCard' const MyChores = () => { @@ -184,18 +183,7 @@ const MyChores = () => { } if (userProfile === null) { - return ( - <Container className='flex h-full items-center justify-center'> - <Box className='flex flex-col items-center justify-center'> - <CircularProgress - color='success' - sx={{ '--CircularProgress-size': '200px' }} - > - <Logo /> - </CircularProgress> - </Box> - </Container> - ) + return <LoadingComponent /> } return ( |