Add Suno pagination (#169)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
ddb8cc2ea1
commit
5d91f2699a
44 files changed
+1148
-942
No files matched your search
@@ -0,0 +1,10 @@
|
||||
export function mergeAndSortLists(list1: any, list2: any) {
|
||||
const mergedMap = new Map();
|
||||
|
||||
[...list1, ...list2].forEach((item) => {
|
||||
mergedMap.set(item.id, item);
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
return Array.from(mergedMap.values()).sort((a, b) => new Date(a.created_at) - new Date(b.created_at));
|
||||
}
|
||||
Reference in new issue
Block a user