-
Notifications
You must be signed in to change notification settings - Fork 178
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): Fix modules not populating the modules card #3278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💸
@@ -9,8 +9,8 @@ type Props = { | |||
} | |||
|
|||
export default function ModulesCardContents (props: Props) { | |||
const {modules, showThermo} = props | |||
if (!modules || !modules[0] || !showThermo) return <NoModulesMessage /> | |||
const {modules} = props |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To preserve intended functionality, could we consider this change instead?
// ...
import filter from 'lodash/filter'
// ...
export default function ModulesCardContents (props: Props) {
const {showThermo} = props
const modules = filter(props.modules, m => {
return showThermo || m.name !== 'thermocycler'
})
if (modules.length === 0) return <NoModulesMessage />
return (
<React.Fragment>
{modules.map((mod, index) => (
<ModuleItem module={mod} key={index} />
))}
</React.Fragment>
)
}
Codecov Report
@@ Coverage Diff @@
## edge #3278 +/- ##
==========================================
- Coverage 53.58% 53.57% -0.01%
==========================================
Files 711 711
Lines 20739 20742 +3
==========================================
Hits 11112 11112
- Misses 9627 9630 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate the changes! 🍓
overview
Logic was introduced into edge which made the modules (temperature + magnetic) not populate the modules card in the app even though the endpoint was returning correctly formatted data. We will need to do another alpha release once this is merged.
changelog
review requests
Please test this branch on your robot