add set description in sell item

This commit is contained in:
aurinex
2025-12-29 22:31:20 +05:00
parent 614f6d0a25
commit 5dc1744cfd
3 changed files with 41 additions and 17 deletions

View File

@ -161,6 +161,8 @@ const PlayerInventory = React.forwardRef<PlayerInventoryHandle, PlayerInventoryP
const [sellLoading, setSellLoading] = useState<boolean>(false);
const [sellError, setSellError] = useState<string | null>(null);
const [description, setDescription] = useState('');
// Функция для запроса инвентаря игрока
const fetchPlayerInventory = async () => {
try {
@ -256,6 +258,7 @@ const PlayerInventory = React.forwardRef<PlayerInventoryHandle, PlayerInventoryP
amount,
price,
serverIp,
description,
);
// Проверяем статус операции
@ -503,6 +506,15 @@ const PlayerInventory = React.forwardRef<PlayerInventoryHandle, PlayerInventoryP
sx={INPUT_SX}
/>
<TextField
label="Описание (необязательно)"
fullWidth
value={description}
onChange={(e) => setDescription(e.target.value)}
inputProps={{ min: 1 }}
sx={INPUT_SX}
/>
{sellError && (
<Box
sx={{