diff --git a/src/App.js b/src/App.js index d97e40b..a888380 100644 --- a/src/App.js +++ b/src/App.js @@ -126,6 +126,7 @@ function VoteRequest(id, up) { } // Create a function to compare date values +/* function comparePublishedAt(a, b) { // Check if PublishedAt for both a and b is empty if (!a.PublishedAt && !b.PublishedAt) { @@ -150,7 +151,7 @@ function comparePublishedAt(a, b) { return 1; } return 0; -} +} */ function dateDiffInDays(a, b) { const diffInMs = Math.abs(b - a); @@ -228,7 +229,7 @@ function App() { ) : products.NewProducts.length > 0 ? ( <> - {products.NewProducts.sort(comparePublishedAt).map( + {products.NewProducts /*.sort(comparePublishedAt) */.map( (product, index) => (showMore.newProducts || index < 5) && (