mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 23:22:42 +00:00
Simplify sort algorithm
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
@@ -40,8 +40,7 @@ const authorLookup = ()=>{
|
|||||||
{results
|
{results
|
||||||
.sort((a, b)=>{ // Sort brews from most recently updated
|
.sort((a, b)=>{ // Sort brews from most recently updated
|
||||||
if(a.updatedAt > b.updatedAt) return -1;
|
if(a.updatedAt > b.updatedAt) return -1;
|
||||||
if(a.updatedAt < b.updatedAt) return 1;
|
return 1;
|
||||||
return 0;
|
|
||||||
})
|
})
|
||||||
.map((brew, idx)=>{
|
.map((brew, idx)=>{
|
||||||
return <tr key={idx}>
|
return <tr key={idx}>
|
||||||
|
|||||||
Reference in New Issue
Block a user