rework circulars loaders

This commit is contained in:
2025-12-05 01:29:06 +05:00
parent fc5e65f189
commit 215e3d6d39
11 changed files with 130 additions and 93 deletions

View File

@ -8,7 +8,6 @@ import {
CardMedia,
CardContent,
Button,
CircularProgress,
Dialog,
DialogTitle,
DialogContent,
@ -22,6 +21,7 @@ import {
sellItem,
PlayerInventoryItem,
} from '../api';
import { FullScreenLoader } from './FullScreenLoader';
interface PlayerInventoryProps {
username: string;
@ -223,9 +223,7 @@ export default function PlayerInventory({
)}
{loading ? (
<Box sx={{ display: 'flex', justifyContent: 'center', my: 4 }}>
<CircularProgress />
</Box>
<FullScreenLoader fullScreen={false} />
) : (
<>
{inventoryItems.length === 0 ? (
@ -266,7 +264,13 @@ export default function PlayerInventory({
alt={item.material}
/>
<CardContent sx={{ p: 1 }}>
<Box sx={{ display: 'flex', gap: '1vw', justifyContent: 'space-between' }}>
<Box
sx={{
display: 'flex',
gap: '1vw',
justifyContent: 'space-between',
}}
>
<Typography variant="body2" color="white" noWrap>
{getItemDisplayName(item.material)}
</Typography>
@ -363,7 +367,7 @@ export default function PlayerInventory({
color="primary"
disabled={sellLoading}
>
{sellLoading ? <CircularProgress size={24} /> : 'Продать'}
{sellLoading ? <FullScreenLoader fullScreen={false} /> : 'Продать'}
</Button>
</DialogActions>
</Dialog>