Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubervila committed Oct 5, 2023
1 parent 9556a34 commit 67f965c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions frontend/components/ProductRemove.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import PropTypes from 'prop-types'
import LoadingButton from '@mui/lab/LoadingButton'
import Button from '@mui/material/Button'
import Dialog from '@mui/material/Dialog'
import DialogActions from '@mui/material/DialogActions'
import DialogContent from '@mui/material/DialogContent'
import DialogContentText from '@mui/material/DialogContentText'
import DialogTitle from '@mui/material/DialogTitle'
import Button from '@mui/material/Button'
import LoadingButton from '@mui/lab/LoadingButton'
import PropTypes from 'prop-types'
import React from 'react'
import { deleteProduct } from '../services/product'

export default function ProductRemove({
Expand Down Expand Up @@ -48,23 +48,23 @@ export default function ProductRemove({
</DialogContent>
<DialogActions>
<Button onClick={onClose}>Cancel</Button>
{isAuthorized ? (
{isAuthorized && (
<LoadingButton
loading={isLoading}
variant="contained"
onClick={handleDelete}
>
Delete
</LoadingButton>
) : (
<Button onClick={onClose}>Close</Button>
)}
</DialogActions>
{!isAuthorized && (
<Dialog open={true}>
<DialogContent>
<DialogContentText>
{'You cannot delete this data product because it belongs to another user.'}
{
'You cannot delete this data product because it belongs to another user.'
}
</DialogContentText>
</DialogContent>
<DialogActions>
Expand Down

0 comments on commit 67f965c

Please sign in to comment.