Projekt

Obecné

Profil

« Předchozí | Další » 

Revize f456d0a0

Přidáno uživatelem Václav Honzík před více než 2 roky(ů)

re #9369 map placeholder

Zobrazit rozdíly:

frontend/src/features/Catalog/CatalogItemDetail.tsx
1
import { Divider, Grid, Paper, Typography } from '@mui/material'
1
import { Box, Divider, Grid, Paper, Skeleton, Typography } from '@mui/material'
2 2
import { Fragment, ReactNode } from 'react'
3 3
import { CatalogItemDto } from '../../swagger/data-contracts'
4 4

  
......
21 21
        <Fragment>
22 22
            <Grid sx={{ my: 2 }} container justifyContent="space-around">
23 23
                <Grid item xs={8} sx={{ px: 1 }}>
24
                    <Typography>{rowName}</Typography>
24
                    <Typography fontWeight={500}>{rowName}</Typography>
25 25
                </Grid>
26 26
                <Grid item xs={4} sx={{ ml: 'auto' }}>
27 27
                    {items.map((item) => (
......
56 56
        },
57 57
        {
58 58
            rowName: 'Coordinates',
59
            items: [`${item.longitude} ${item.latitude}`],
59
            items: [`${item.longitude}°, ${item.latitude}°`],
60 60
        },
61 61

  
62 62
        {
......
73 73

  
74 74
    return (
75 75
        // TODO remove min height
76
        <Paper style={{ minHeight: '100vh', borderRadius: 0 }}>
76
        <Paper style={{ minHeight: '100vh', borderRadius: 0 }} elevation={2}>
77 77
            <Grid container justifyContent="space-around">
78 78
                {/* <Paper style={{ minHeight: '100vh', borderRadius: 0 }}> */}
79 79
                <Grid item xs={6} sx={{ px: 2 }}>
......
91 91
                </Grid>
92 92

  
93 93
                <Grid item xs={6}>
94
                    {/* Map */}
94
                    <Box sx={{ px: 2, py: 4 }}>
95
                        <Typography variant="h4" sx={{mb: 4}} fontWeight="bold">Map</Typography>
96

  
97
                        <Skeleton
98
                        animation="pulse"
99
                            variant="rectangular"
100
                            width={'100%'}
101
                            height={400}
102
                        />
103
                        {/* <Skeleton animation="wave" />
104
                        <Skeleton animation="wave" />
105
                        <Skeleton animation="wave" />
106
                        <Skeleton animation="wave" /> */}
107
                    </Box>
95 108
                </Grid>
96 109
                {/* </Paper> */}
97 110
            </Grid>
frontend/src/features/Catalog/catalogSlice.ts
32 32
        builder.addCase(getCatalogItems.rejected, (state, action) => ({
33 33
            ...state, lastErr: action.payload as string
34 34
        }))
35
        builder.addCase(getCatalogItem.fulfilled, (state, action) => ({
36
            ...state, catalogItem: action.payload, isItemLoading: false,
37
        }))
38
        builder.addCase(getCatalogItem.rejected, (state, action) => ({
39
            ...state, lastErr: action.payload as string
40
        }))
35 41
    },
36 42
})

Také k dispozici: Unified diff