phongdt:sort

This commit is contained in:
Duong Truong Phong
2024-06-04 09:40:30 +07:00
parent 0729e021bd
commit 343ac29a57
+1 -1
View File
@@ -33,7 +33,7 @@ export const useDynamicPageStore = defineStore("dynamicPageStore", () => {
sectionPublished.value = currentPage.value.sections && currentPage.value.sections.filter( sectionPublished.value = currentPage.value.sections && currentPage.value.sections.filter(
(section: any) => section.isPublished && !contentArr.flat().some((_section: any) => _section && _section.data && _section.type === "section" && section.id === _section.data) (section: any) => section.isPublished && !contentArr.flat().some((_section: any) => _section && _section.data && _section.type === "section" && section.id === _section.data)
); ).sort((a, b) => a.order - b.order);
}; };