Skip to content

Commit

Permalink
I implemented an arrow to make it easier to return to the previous pa…
Browse files Browse the repository at this point in the history
…ge and improved the visibility of the refresh button, making it more prominent.
  • Loading branch information
jandsonrj committed Nov 29, 2023
1 parent 29bc019 commit 454fd18
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions frontend/pages/product/edit/[pid].js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UploadIcon from '@mui/icons-material/Upload'
import VerifiedIcon from '@mui/icons-material/Verified'
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'

import Alert from '@mui/material/Alert'
import Box from '@mui/material/Box'
Expand Down Expand Up @@ -184,8 +185,29 @@ export default function EditProduct() {
<Container sx={{ flex: 1, m: 4 }}>
{isLoading && <Loading isLoading={isLoading} />}
<React.Fragment>
<Box mb={5}>
<Typography variant="h6">Edit Product</Typography>
<Box
sx={{
mt: 2,
mb: 2,
p: 2
}}
alignItems="center"
justifyContent="space-between"
>
<Stack
direction="row"
justifyContent="flex-start"
alignItems="center"
spacing={2}
>
<ArrowBackIosIcon
onClick={() => {
router.back()
}}
sx={{ cursor: 'pointer' }}
/>
<Typography variant="h6">Edit Product</Typography>
</Stack>
</Box>
<Box
sx={{
Expand Down Expand Up @@ -269,11 +291,13 @@ export default function EditProduct() {
</CardContent>
<CardActions>
<Button
size="small"
size="large"
variant="contained"
disabled={
originalProduct?.description === product?.description
}
onClick={handleUpdate}
sx={{ width: '100%' }}
>
Update
</Button>
Expand Down

0 comments on commit 454fd18

Please sign in to comment.