refactor: Remove unused helper function convertToTableRows in SwitchOutputView component
This commit is contained in:
parent
c8a72aaeca
commit
8976e30f41
1 changed files with 2 additions and 3 deletions
|
|
@ -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"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue