refactor(flows): reverse the order of flows to display the latest ones first

refactor(MainPage): comment out code that adds "From Store" sidebar navigation item
feat(flow): add date_created property to FlowType to track the creation date of flows
This commit is contained in:
cristhianzl 2023-11-13 19:25:56 -03:00
commit 75e144dd26
3 changed files with 8 additions and 6 deletions

View file

@ -32,6 +32,7 @@ export default function FlowsComponent() {
> >
{flows {flows
.filter((flow) => !flow.is_component) .filter((flow) => !flow.is_component)
.reverse()
.map((flow, idx) => ( .map((flow, idx) => (
<CardComponent <CardComponent
key={idx} key={idx}

View file

@ -33,12 +33,12 @@ export default function HomePage(): JSX.Element {
}, },
]; ];
if (hasStore) { // if (hasStore) {
sidebarNavItems.push({ // sidebarNavItems.push({
title: "From Store", // title: "From Store",
href: "/from-store", // href: "/from-store",
}); // });
} // }
// Set a null id // Set a null id
useEffect(() => { useEffect(() => {

View file

@ -9,6 +9,7 @@ export type FlowType = {
style?: FlowStyleType; style?: FlowStyleType;
is_component?: boolean; is_component?: boolean;
parent?: string; parent?: string;
date_created?: string;
}; };
export type NodeType = { export type NodeType = {
id: string; id: string;