Skip to content

Commit

Permalink
Improve show/hide of item delete
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervspl committed Jul 31, 2024
1 parent 831da2e commit 72f044a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use client';

import { $path } from 'next-typesafe-url';
import Link from 'next/link';
import { $path } from 'next-typesafe-url';
import { MoveDownRightIcon, MoveUpRightIcon } from 'lucide-react';

import { CoinValue } from 'common/coin-value';
import { Card, CardHeader, CardContent } from 'shadcn-ui/card';
import { useSettings } from 'hooks/use-settings';
import { MoveDownRightIcon, MoveUpRightIcon } from 'lucide-react';
import { cn } from 'services/cn';
import { getTextQualityColor } from 'services/colors';
import { Card, CardHeader, CardContent } from 'shadcn-ui/card';
import { CoinValue } from 'common/coin-value';
import { ItemImage } from 'common/item-image';

type Props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const ItemLink = ({ item, settings, sectionId, sectionItemid }: ItemLinkProps) =
style={{ ...getTextQualityColor(item.quality) }}
>
<ItemImage item={item} width={30} height={30} />
<div className="flex items-center gap-2 justify-between w-full">
<div className="flex items-center gap-4 justify-between w-full">
{item.name}
{deleteItem.isPending ? (
<Loader2Icon className="animate-spin text-white" size={16} />
Expand All @@ -173,7 +173,7 @@ const ItemLink = ({ item, settings, sectionId, sectionItemid }: ItemLinkProps) =
e.preventDefault();
onDeleteItemClick(sectionItemid);
}}
className="hidden group-hover/item:block"
className="opacity-0 group-hover/item:opacity-100"
>
<XIcon size={16} className="text-white" />
</IconButton>
Expand Down

0 comments on commit 72f044a

Please sign in to comment.