fix items in PlayerInventory
This commit is contained in:
@ -235,10 +235,15 @@ export default function PlayerInventory({
|
||||
Ваш инвентарь пуст или не удалось загрузить предметы.
|
||||
</Typography>
|
||||
) : (
|
||||
<Grid container spacing={2}>
|
||||
<Grid
|
||||
container
|
||||
spacing={2}
|
||||
columns={10}
|
||||
sx={{ justifyContent: 'center' }}
|
||||
>
|
||||
{inventoryItems.map((item) =>
|
||||
item.material !== 'AIR' && item.amount > 0 ? (
|
||||
<Grid item xs={6} sm={4} md={3} lg={2} key={item.slot}>
|
||||
<Grid item xs={1} key={item.slot}>
|
||||
<Card
|
||||
sx={{
|
||||
bgcolor: 'rgba(255, 255, 255, 0.05)',
|
||||
@ -256,7 +261,6 @@ export default function PlayerInventory({
|
||||
minHeight: '10vw',
|
||||
maxHeight: '10vw',
|
||||
objectFit: 'contain',
|
||||
bgcolor: 'white',
|
||||
p: '1vw',
|
||||
imageRendering: 'pixelated',
|
||||
}}
|
||||
@ -271,10 +275,19 @@ export default function PlayerInventory({
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<Typography variant="body2" color="white" noWrap>
|
||||
<Typography
|
||||
variant="body2"
|
||||
color="white"
|
||||
noWrap
|
||||
sx={{ fontSize: '0.8vw' }}
|
||||
>
|
||||
{getItemDisplayName(item.material)}
|
||||
</Typography>
|
||||
<Typography variant="body2" color="white">
|
||||
<Typography
|
||||
variant="body2"
|
||||
color="white"
|
||||
sx={{ fontSize: '0.8vw' }}
|
||||
>
|
||||
{item.amount > 1 ? `x${item.amount}` : ''}
|
||||
</Typography>
|
||||
</Box>
|
||||
@ -282,7 +295,7 @@ export default function PlayerInventory({
|
||||
<Typography
|
||||
variant="caption"
|
||||
color="secondary"
|
||||
sx={{ display: 'block' }}
|
||||
sx={{ display: 'block', fontSize: '0.8vw' }}
|
||||
>
|
||||
Зачарования: {Object.keys(item.enchants).length}
|
||||
</Typography>
|
||||
|
||||
Reference in New Issue
Block a user