Skip to content

Commit

Permalink
fix(app): fix accessing file name on FileCard
Browse files Browse the repository at this point in the history
Fixes accidental reversion resulting in populating file name on FileCard with empty string. We need
to reach into csvParam.file.file.name rather than just csvParam.file.name on desktop.
  • Loading branch information
ncdiehl11 committed Aug 7, 2024
1 parent 8ce3880 commit 0e57ed4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/organisms/ChooseRobotSlideout/FileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function FileCard(props: FileCardProps): JSX.Element {
white-space: nowrap;
`}
>
{truncateString(fileRunTimeParameter?.file?.name ?? '', 35, 18)}
{truncateString(fileRunTimeParameter?.file?.file?.name ?? '', 35, 18)}
</LegacyStyledText>
<Flex alignItems={ALIGN_CENTER}>
<Btn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const mockSetRunTimeParametersOverrides = vi.fn()

const mockCsvRunTimeParameterSuccess: CsvFileParameter = {
displayName: 'My sample file',
file: { id: 'my_file_id', name: 'my_file.csv' },
file: { id: 'my_file_id', file: { name: 'my_file.csv' } as File },
variableName: 'my_sample_csv',
description: 'This is a mock CSV runtime parameter',
type: 'csv_file',
Expand Down

0 comments on commit 0e57ed4

Please sign in to comment.