mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-29 19:08:33 +08:00
fix: wrong database tab order due to date string conversion (#54)
This commit is contained in:
@@ -54,7 +54,7 @@ export function useDatabaseViewsSelector (_iidIndex: string, visibleViewIds?: st
|
||||
const viewsObj = views.toJSON() as Record<
|
||||
string,
|
||||
{
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
}
|
||||
>;
|
||||
|
||||
@@ -62,7 +62,7 @@ export function useDatabaseViewsSelector (_iidIndex: string, visibleViewIds?: st
|
||||
const [, viewA] = a;
|
||||
const [, viewB] = b;
|
||||
|
||||
return Number(viewB.created_at) - Number(viewA.created_at);
|
||||
return Date.parse(viewB.created_at) - Date.parse(viewA.created_at);
|
||||
});
|
||||
|
||||
setViewIds(
|
||||
|
||||
Reference in New Issue
Block a user