Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): ensure ApplyHistoricOffsets renders on non-RTP protocols #14948

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions app/src/organisms/ChooseRobotToRunProtocolSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
</PrimaryButton>
)

const offsetsComponent = (
<ApplyHistoricOffsets
offsetCandidates={offsetCandidates}
shouldApplyOffsets={shouldApplyOffsets}
setShouldApplyOffsets={setShouldApplyOffsets}
commands={mostRecentAnalysis?.commands ?? []}
labware={mostRecentAnalysis?.labware ?? []}
modules={mostRecentAnalysis?.modules ?? []}
/>
)

const resetRunTimeParameters = (): void => {
setRunTimeParametersOverrides(
runTimeParametersOverrides?.map(parameter => ({
Expand Down Expand Up @@ -214,14 +225,7 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
{hasRunTimeParameters ? (
currentPage === 1 ? (
<>
<ApplyHistoricOffsets
offsetCandidates={offsetCandidates}
shouldApplyOffsets={shouldApplyOffsets}
setShouldApplyOffsets={setShouldApplyOffsets}
commands={mostRecentAnalysis?.commands ?? []}
labware={mostRecentAnalysis?.labware ?? []}
modules={mostRecentAnalysis?.modules ?? []}
/>
{offsetsComponent}
<PrimaryButton
onClick={() => setCurrentPage(2)}
width="100%"
Expand Down Expand Up @@ -253,7 +257,10 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
</Flex>
)
) : (
SinglePageButtonWithoutFF
<>
{offsetsComponent}
{SinglePageButtonWithoutFF}
ncdiehl11 marked this conversation as resolved.
Show resolved Hide resolved
</>
)}
</Flex>
}
Expand Down
Loading