Skip to content

Commit

Permalink
fix(dashboard): nested parents
Browse files Browse the repository at this point in the history
  • Loading branch information
bryson-g committed Feb 19, 2025
1 parent ee9ddfb commit da82b3f
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@ import { WfRunId } from 'littlehorse-client/proto'
type Props = { params: { ids: string[]; tenantId: string } }

export default async function Page({ params: { ids, tenantId } }: Props) {
let wfRunId: WfRunId;
if (ids[1]) {
wfRunId = {
id: ids[1],
parentWfRunId: {
id: ids[0],
}
}
} else {
wfRunId = {
id: ids[0],
}
}
const wfRunId: WfRunId = ids.reduce((wfRunId, id, i) => (i === 0 ? { id } : { id, parentWfRunId: wfRunId }), {} as WfRunId);

try {
return <WfRun wfRunId={wfRunId} tenantId={tenantId} />
Expand Down

0 comments on commit da82b3f

Please sign in to comment.