Skip to content

Commit

Permalink
add snackbar to paramters
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Mar 14, 2024
1 parent f61aa5e commit aef6513
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/assets/localization/en/protocol_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"sending": "Sending",
"show_in_folder": "Show in folder",
"slot": "Slot {{slotName}}",
"start_setup_to_customize": "Start setup to customize values",
"start_setup": "Start setup",
"successfully_sent": "Successfully sent",
"total_volume": "total volume",
Expand Down
7 changes: 6 additions & 1 deletion app/src/pages/ProtocolDetails/Parameters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
WRAP,
} from '@opentrons/components'
import { StyledText } from '../../atoms/text'
import { useToaster } from '../../organisms/ToasterOven'
import { useRequiredProtocolHardware } from '../Protocols/hooks'
import { EmptySection } from './EmptySection'

Expand Down Expand Up @@ -51,12 +52,16 @@ export const Parameters = (props: { protocolId: string }): JSX.Element => {
const { requiredProtocolHardware } = useRequiredProtocolHardware(
props.protocolId
)
const { makeSnackbar } = useToaster()
const { t, i18n } = useTranslation('protocol_details')

const makeSnack = (): void => {
makeSnackbar(t('start_setup_to_customize'))
}
return requiredProtocolHardware.length === 0 ? (
<EmptySection section="parameters" />
) : (
<Table>
<Table onClick={makeSnack}>
<thead>
<tr>
<TableHeader>
Expand Down

0 comments on commit aef6513

Please sign in to comment.