diff --git a/app/src/components/Pipelines.js b/app/src/components/Pipelines.js index 32b66a2..81b49c4 100644 --- a/app/src/components/Pipelines.js +++ b/app/src/components/Pipelines.js @@ -5,7 +5,7 @@ import React, { useState, useEffect, - useContext + useContext, } from 'react'; import { useHistory } from 'react-router-dom'; import { DataTable } from 'primereact/datatable'; @@ -50,34 +50,23 @@ const Pipelines = () => { const [loading, setLoading] = useState(false); const [datatable, setDatatable] = useState([]); - // If auth is still null, render a loading spinner or some fallback UI - // useEffect(() => { - // if (auth !== null) { - // const data = pipelineFiles.map(convertDataToTable); - // setDatatable(data); - // setLoading(false); - // } - // }, [auth]); - // Perform actions outside the main scope useEffect(() => { + // transform the data pipeline for the table + const convertDataToTable = (data) => ({ + id: data.$id, + status: , + title: data.title, + description: data.description, + url: , + action: + }); + const data = pipelineFiles.map(convertDataToTable); setDatatable(data); setLoading(false); - }, []); + }, [auth]); - - // Transform the data pipeline for the table - const convertDataToTable = (data) => ({ - id: data.$id, - status: , - title: data.title, - description: data.description, - url: , - action: - }); - // const [datatable] = useState(pipelineFiles.map(convertDataToTable)); - // Define header const columns = [ { field: 'status', header: 'Status' }, @@ -107,10 +96,10 @@ const Pipelines = () => { // Lunch Button that redirect to "Parameters" const LunchButton = ({ data, auth }) => { const history = useHistory(); - const [navigate, setNavigate] = useState(false); - const [workflowId, setWorkflowId] = useState({}); + const [workflowId, setWorkflowId] = useState(''); const [attemptId, setAttemptId] = useState(0); - const [datasetId, setDatasetId] = useState({}); + const [datasetId, setDatasetId] = useState(''); + const [navigate, setNavigate] = useState(false); // Navigate to parameter form useEffect(() => { diff --git a/app/src/components/Workflow.js b/app/src/components/Workflow.js index 8c217fc..8d0e081 100644 --- a/app/src/components/Workflow.js +++ b/app/src/components/Workflow.js @@ -398,7 +398,7 @@ const FileViewer = ({typeOutput, files, expandedKeys, onToggle, workflowId, atte }); return ( ); };