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