@@ -3,8 +3,7 @@ import { updateItem, deleteItem } from '../api';
33import { calculateDateNextPurchased , ONE_DAY_IN_MILLISECONDS } from '../utils' ;
44import { toast } from 'react-toastify' ;
55import { useConfirmDialog } from '../hooks/useConfirmDialog' ;
6- import { ConfirmDialog } from './ConfirmDialog' ;
7- import { DeleteIconWithTooltip , tooltipStyle } from './DeleteIconWithTooltip' ;
6+ import { DeleteIconWithTooltip , tooltipStyle , ConfirmDialog } from './index' ;
87import {
98 ListItem as MaterialListItem ,
109 Tooltip ,
@@ -39,12 +38,6 @@ const urgencyStatusStyle = {
3938 color : 'white' ,
4039} ;
4140
42- const toolTipStyle = {
43- fontSize : '1.5rem' ,
44- marginBlockStart : '0' ,
45- marginBlockEnd : '0' ,
46- } ;
47-
4841const calculateIsPurchased = ( dateLastPurchased ) => {
4942 if ( ! dateLastPurchased ) {
5043 return false ;
@@ -86,7 +79,6 @@ export function ListItem({ item, listPath, itemUrgencyStatus }) {
8679 } ;
8780
8881 const handleDeleteItem = async ( ) => {
89- console . log ( 'attempting item deletion' ) ;
9082 try {
9183 await deleteItem ( listPath , id ) ;
9284 toast . success ( 'Item deleted' ) ;
@@ -102,7 +94,7 @@ export function ListItem({ item, listPath, itemUrgencyStatus }) {
10294 handleDelete : handleDeleteItem ,
10395 title : `Are you sure you want to delete ${ name } ?` ,
10496 setOpen : isOpen ,
105- open : open ,
97+ open,
10698 } ;
10799
108100 const tooltipTitle = isPurchased
@@ -115,7 +107,7 @@ export function ListItem({ item, listPath, itemUrgencyStatus }) {
115107 < MaterialListItem className = "ListItem" >
116108 { UrgencyStatusIcon && (
117109 < Tooltip
118- title = { < p style = { toolTipStyle } > { itemUrgencyStatus } </ p > }
110+ title = { < p style = { tooltipStyle } > { itemUrgencyStatus } </ p > }
119111 placement = "left"
120112 arrow
121113 >
0 commit comments