Skip to content

Reduce boilerplate ResultItem visualization code

Currently, the fields of ResultItem that are being displayed are hardcoded (https://codebase.helmholtz.cloud/hmc/hmc-public/unhide/unhide-ui/-/blame/dev/src/components/app/results/ListResults/ResultItem.tsx?ref_type=heads#L79) It took a while to find this place and add the new fields that came from the new data type (OMEImage). I suggest refactoring this code by a method which would automatically sweep through the available fields of ResultDocs (src/unhide-docker/unhide-ui/src/types/types.ts), and display those available.