mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 22:52:40 +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
|
||||
.sort((a, b)=>{ // Sort brews from most recently updated
|
||||
if(a.updatedAt > b.updatedAt) return -1;
|
||||
if(a.updatedAt < b.updatedAt) return 1;
|
||||
return 0;
|
||||
return 1;
|
||||
})
|
||||
.map((brew, idx)=>{
|
||||
return <tr key={idx}>
|
||||
|
||||
Reference in New Issue
Block a user