diff --git a/web/components/routes/link/list-item.tsx b/web/components/routes/link/list-item.tsx index 551c92fa..419fb520 100644 --- a/web/components/routes/link/list-item.tsx +++ b/web/components/routes/link/list-item.tsx @@ -41,6 +41,7 @@ export const ListItem: React.FC = ({ }) => { const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: personalLink.id, disabled }) const formRef = React.useRef(null) + const [showDeleteIcon, setShowDeleteIcon] = React.useState(false) const style = { transform: CSS.Transform.toString(transform), @@ -77,8 +78,15 @@ export const ListItem: React.FC = ({ setEditId(null) } + // const handleRowClick = () => { + // console.log("Row clicked", personalLink.id) + // setEditId(personalLink.id) + // } const handleRowClick = () => { - console.log("Row clicked", personalLink.id) + setShowDeleteIcon(!showDeleteIcon) + } + + const handleDoubleClick = () => { setEditId(personalLink.id) } @@ -126,6 +134,7 @@ export const ListItem: React.FC = ({ "bg-muted/50": isFocused })} onClick={handleRowClick} + onDoubleClick={handleDoubleClick} >
@@ -177,13 +186,15 @@ export const ListItem: React.FC = ({
Topic Name - + {showDeleteIcon && ( + + )}