From a24134f8525373f5707b6c48aa77d3f4aff70799 Mon Sep 17 00:00:00 2001
From: Mo Tarbin <mhed.t91@gmail.com>
Date: Tue, 9 Jul 2024 17:39:16 -0400
Subject: Add useWindowWidth hook and HistoryCard component

---
 src/views/Chores/ChoreCard.jsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/views/Chores/ChoreCard.jsx')

diff --git a/src/views/Chores/ChoreCard.jsx b/src/views/Chores/ChoreCard.jsx
index 5e54e6b..08a5406 100644
--- a/src/views/Chores/ChoreCard.jsx
+++ b/src/views/Chores/ChoreCard.jsx
@@ -45,7 +45,14 @@ import DateModal from '../Modals/Inputs/DateModal'
 import SelectModal from '../Modals/Inputs/SelectModal'
 import TextModal from '../Modals/Inputs/TextModal'
 import WriteNFCModal from '../Modals/Inputs/WriteNFCModal'
-const ChoreCard = ({ chore, performers, onChoreUpdate, onChoreRemove, sx }) => {
+const ChoreCard = ({
+  chore,
+  performers,
+  onChoreUpdate,
+  onChoreRemove,
+  sx,
+  viewOnly,
+}) => {
   const [activeUserId, setActiveUserId] = React.useState(0)
   const [isChangeDueDateModalOpen, setIsChangeDueDateModalOpen] =
     React.useState(false)
@@ -367,6 +374,7 @@ const ChoreCard = ({ chore, performers, onChoreUpdate, onChoreRemove, sx }) => {
       </Chip>
 
       <Card
+        style={viewOnly ? { pointerEvents: 'none' } : {}}
         variant='plain'
         sx={{
           ...sx,
-- 
cgit 

