mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-12-01 11:57:53 +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<
|
const viewsObj = views.toJSON() as Record<
|
||||||
string,
|
string,
|
||||||
{
|
{
|
||||||
created_at: number;
|
created_at: string;
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export function useDatabaseViewsSelector (_iidIndex: string, visibleViewIds?: st
|
|||||||
const [, viewA] = a;
|
const [, viewA] = a;
|
||||||
const [, viewB] = b;
|
const [, viewB] = b;
|
||||||
|
|
||||||
return Number(viewB.created_at) - Number(viewA.created_at);
|
return Date.parse(viewB.created_at) - Date.parse(viewA.created_at);
|
||||||
});
|
});
|
||||||
|
|
||||||
setViewIds(
|
setViewIds(
|
||||||
|
|||||||
Reference in New Issue
Block a user