Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jan 2, 2024
1 parent cae3afc commit afcbb0f
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,29 +238,6 @@ export default function DataviewsPatterns() {
};
}
let filteredData = [ ...patterns ];
// Handle filters.
if ( view.filters.length > 0 ) {
// view.filters.forEach( ( filter ) => {
// if (
// filter.field === 'author' &&
// filter.operator === OPERATOR_IN &&
// !! filter.value
// ) {
// filteredData = filteredData.filter( ( item ) => {
// return item.author_text === filter.value;
// } );
// } else if (
// filter.field === 'author' &&
// filter.operator === OPERATOR_NOT_IN &&
// !! filter.value
// ) {
// filteredData = filteredData.filter( ( item ) => {
// return item.author_text !== filter.value;
// } );
// }
// } );
}

// Handle sorting.
if ( view.sort ) {
const stringSortingFields = [ 'title' ];
Expand All @@ -278,7 +255,6 @@ export default function DataviewsPatterns() {
} );
}
}

// Handle pagination.
const start = ( view.page - 1 ) * view.perPage;
const totalItems = filteredData?.length || 0;
Expand Down Expand Up @@ -306,7 +282,6 @@ export default function DataviewsPatterns() {
},
};
}

setView( newView );
},
[ view.type, setView ]
Expand Down

0 comments on commit afcbb0f

Please sign in to comment.