refactor: Remove unused helper function convertToTableRows in SwitchOutputView component

This commit is contained in:
ogabrielluiz 2024-06-05 12:52:31 -03:00
commit 8976e30f41

View file

@ -3,7 +3,6 @@ import { Case } from "../../../../../../shared/components/caseComponent";
import TextOutputView from "../../../../../../shared/components/textOutputView"; import TextOutputView from "../../../../../../shared/components/textOutputView";
import useFlowStore from "../../../../../../stores/flowStore"; import useFlowStore from "../../../../../../stores/flowStore";
import ErrorOutput from "./components"; import ErrorOutput from "./components";
import { convertToTableRows } from "./helpers/convert-to-table-rows";
export default function SwitchOutputView(nodeId): JSX.Element { export default function SwitchOutputView(nodeId): JSX.Element {
const nodeIdentity = nodeId.nodeId; const nodeIdentity = nodeId.nodeId;
@ -19,7 +18,7 @@ export default function SwitchOutputView(nodeId): JSX.Element {
const results = flowPoolNode?.data?.logs[0] ?? ""; const results = flowPoolNode?.data?.logs[0] ?? "";
const resultType = results?.type; const resultType = results?.type;
const resultMessage = results?.message; const resultMessage = results?.message;
console.log("resultType", results);
return ( return (
<> <>
<Case condition={!resultType || resultType === "unknown"}> <Case condition={!resultType || resultType === "unknown"}>
@ -43,7 +42,7 @@ export default function SwitchOutputView(nodeId): JSX.Element {
<Case condition={resultType === "object"}> <Case condition={resultType === "object"}>
<RecordsOutputComponent <RecordsOutputComponent
rows={convertToTableRows(resultMessage)} rows={[resultMessage]}
pagination={true} pagination={true}
columnMode="union" columnMode="union"
/> />