diff --git a/ui/src/library/DeleteLibraryButton.jsx b/ui/src/library/DeleteLibraryButton.jsx index b9e8f1eb1..6cdb1937b 100644 --- a/ui/src/library/DeleteLibraryButton.jsx +++ b/ui/src/library/DeleteLibraryButton.jsx @@ -51,4 +51,4 @@ const DeleteLibraryButton = ({ record, resource, basePath, ...props }) => { ) } -export default DeleteLibraryButton \ No newline at end of file +export default DeleteLibraryButton diff --git a/ui/src/library/LibraryCreate.jsx b/ui/src/library/LibraryCreate.jsx index 16c447280..eb4358b72 100644 --- a/ui/src/library/LibraryCreate.jsx +++ b/ui/src/library/LibraryCreate.jsx @@ -41,11 +41,11 @@ const LibraryCreate = (props) => { if (error.body && error.body.errors) { return error.body.errors } - + // Handle other structured errors from the server if (error.body && error.body.error) { const errorMsg = error.body.error - + // Handle database constraint violations if (errorMsg.includes('UNIQUE constraint failed: library.name')) { return { name: 'ra.validation.unique' } @@ -53,14 +53,15 @@ const LibraryCreate = (props) => { if (errorMsg.includes('UNIQUE constraint failed: library.path')) { return { path: 'ra.validation.unique' } } - + // Show a general notification for other server errors notify(errorMsg, 'error') return } - + // Fallback for unexpected error formats - const fallbackMessage = error.message || + const fallbackMessage = + error.message || (typeof error === 'string' ? error : 'An unexpected error occurred') notify(fallbackMessage, 'error') } @@ -78,4 +79,4 @@ const LibraryCreate = (props) => { ) } -export default LibraryCreate \ No newline at end of file +export default LibraryCreate diff --git a/ui/src/library/LibraryEdit.jsx b/ui/src/library/LibraryEdit.jsx index 5562ccc88..da46a73ab 100644 --- a/ui/src/library/LibraryEdit.jsx +++ b/ui/src/library/LibraryEdit.jsx @@ -119,12 +119,11 @@ const LibraryEdit = (props) => { fullWidth disabled={isFirstLibrary} /> - - Statistics + {/*eslint-disable-next-line react/no-unknown-property*/}
@@ -178,6 +177,7 @@ const LibraryEdit = (props) => {
+ {/*eslint-disable-next-line react/no-unknown-property*/}
diff --git a/ui/src/library/LibraryList.jsx b/ui/src/library/LibraryList.jsx index 3d4e88162..839e3f192 100644 --- a/ui/src/library/LibraryList.jsx +++ b/ui/src/library/LibraryList.jsx @@ -40,11 +40,15 @@ const LibraryList = (props) => { - + )} ) } -export default LibraryList \ No newline at end of file +export default LibraryList diff --git a/ui/src/library/index.js b/ui/src/library/index.js index 868fb2017..cc9fbfaab 100644 --- a/ui/src/library/index.js +++ b/ui/src/library/index.js @@ -1,9 +1,9 @@ import LibraryList from './LibraryList' import LibraryEdit from './LibraryEdit' import LibraryCreate from './LibraryCreate' - + export default { list: LibraryList, edit: LibraryEdit, create: LibraryCreate, -} \ No newline at end of file +}