mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-23 09:47:13 +02:00
16 lines
459 B
React
16 lines
459 B
React
|
|
import React from 'react'
|
||
|
|
import { Typography } from '@material-ui/core'
|
||
|
|
import Alert from '@material-ui/lab/Alert'
|
||
|
|
|
||
|
|
export const ErrorSection = ({ error, translate }) => {
|
||
|
|
if (!error) return null
|
||
|
|
|
||
|
|
return (
|
||
|
|
<Alert severity="error" style={{ marginBottom: 16 }}>
|
||
|
|
<Typography variant="subtitle2">
|
||
|
|
{translate('resources.plugin.fields.lastError')}
|
||
|
|
</Typography>
|
||
|
|
<Typography variant="body2">{error}</Typography>
|
||
|
|
</Alert>
|
||
|
|
)
|
||
|
|
}
|