From 781d2705aa56a60f88a14c2157b4024b3657f1ea Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 5 Mar 2024 20:54:07 -0300 Subject: [PATCH] Update exampleComponent and MainPage components --- .../src/components/exampleComponent/index.tsx | 47 +++++++++++-------- src/frontend/src/pages/MainPage/index.tsx | 2 +- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/frontend/src/components/exampleComponent/index.tsx b/src/frontend/src/components/exampleComponent/index.tsx index 7dff31254..fdaa36766 100644 --- a/src/frontend/src/components/exampleComponent/index.tsx +++ b/src/frontend/src/components/exampleComponent/index.tsx @@ -19,15 +19,17 @@ import { CardTitle, } from "../ui/card"; import { FlowType } from "../../types/flow"; -import { Link } from "react-router-dom"; +import { updateIds } from "../../utils/reactflowUtils"; +import { useNavigate } from "react-router-dom"; export default function CollectionCardComponent({ - data, + flow, }: { - data: FlowType; + flow: FlowType; authorized?: boolean; }) { const addFlow = useFlowsManagerStore((state) => state.addFlow); + const navigate = useNavigate(); return ( - -
{data.name}
+ +
{flow.name}
-
{data.description}
+
{flow.description}
@@ -59,20 +61,25 @@ export default function CollectionCardComponent({
- - - +
diff --git a/src/frontend/src/pages/MainPage/index.tsx b/src/frontend/src/pages/MainPage/index.tsx index 88055ff79..de546befa 100644 --- a/src/frontend/src/pages/MainPage/index.tsx +++ b/src/frontend/src/pages/MainPage/index.tsx @@ -131,7 +131,7 @@ export default function HomePage(): JSX.Element {
{examples.map((example, idx) => { return( - ) + ) })}