16719: Adds integration test for collection's old version searching.
[arvados-workbench2.git] / src / views-components / data-explorer / with-resources.tsx
index f6670bd66426166a87b42366bd7002a90553cf25..54c9396cde1c71f482b27b7fda610fdad28eeb88 100644 (file)
@@ -22,3 +22,6 @@ export const withResource = (component: React.ComponentType<WithResourceProps &
 export const getDataFromResource = (property: string, resource?: Resource) => {
     return resource && resource[property] ? resource[property] : '(none)';
 };
+
+export const withResourceData = (property: string, render: (data: any) => React.ReactElement<any>) =>
+    withResource(({ resource }) => render(getDataFromResource(property, resource)));