🐛 Fix blinking folders

This commit is contained in:
Maxime Lalo 2023-05-05 17:36:06 +02:00
parent e12aabbc43
commit 54b85ad5b9

View File

@ -31,6 +31,10 @@ class FolderListClass extends React.Component<IPropsClass, IState> {
{this.props.folders.sort((folder) => { {this.props.folders.sort((folder) => {
const pendingDocuments = (folder.documents ?? []).filter((document) => document.document_status === EDocumentStatus.DEPOSITED); const pendingDocuments = (folder.documents ?? []).filter((document) => document.document_status === EDocumentStatus.DEPOSITED);
return pendingDocuments.length >= 1 ? -1 : 1; return pendingDocuments.length >= 1 ? -1 : 1;
}).sort((folder1, folder2) => {
return folder1.created_at! < folder2.created_at! ? -1 : 1;
}).sort((folder1, folder2) => {
return folder1.folder_number! < folder2.folder_number! ? -1 : 1;
}).map((folder) => { }).map((folder) => {
return ( return (
<div <div