Items: display a checkmark when item is purchased

items
Alex Gleason 2024-01-13 18:27:09 -06:00
rodzic 1f65cc88b1
commit 46a4cd0753
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -3,7 +3,7 @@ import { type Event } from 'nostr-tools';
import React from 'react';
import { FormattedNumber } from 'react-intl';
import { Button, Column, HStack, Text, Tooltip } from 'soapbox/components/ui';
import { Button, Column, HStack, Icon, Text, Tooltip } from 'soapbox/components/ui';
import { type Account } from 'soapbox/schemas';
interface SoapboxItem {
@ -99,7 +99,16 @@ const Item: React.FC<SoapboxItem> = ({ id, name, image, account, price }) => {
}
return (
<div key={id} className='flex flex-col gap-3 text-center'>
<div key={id} className='relative flex flex-col gap-3 text-center'>
{purchased && (
<div className='absolute right-0 top-0'>
<Icon
className='text-green-500'
src={require('@tabler/icons/discount-check-filled.svg')}
/>
</div>
)}
<img
className='aspect-1 rounded-lg object-contain'
src={image}