Skip to content

Commit

Permalink
fix(semantic hub): review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lavanya-bmw committed Jul 12, 2024
1 parent 4e93f0d commit cf4f646
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/components/basic/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,18 @@ export const Table = ({
const renderErrorMessage = () => {
if (error == null) {
return <Typography variant="body2">{noRowsMsg ?? 'No rows'}</Typography>
} else {
if (error.status >= 400 && error.status < 500) {
return <Error400Overlay errorMessage4xx={error.message} />
} else {
return (
<Error500Overlay
reload={() => {
reload?.()
}}
errorMessage5xx={error.message}
/>
)
}
}
if (error.status >= 400 && error.status < 500) {
return <Error400Overlay errorMessage4xx={error.message} />
}
return (
<Error500Overlay
reload={() => {
reload?.()
}}
errorMessage5xx={error.message}
/>
)
}

const NoRowsOverlay = () => {
Expand Down

0 comments on commit cf4f646

Please sign in to comment.