add set description in sell item
This commit is contained in:
@ -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={{
|
||||
|
||||
Reference in New Issue
Block a user