X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6e0c6489bc761bac498ff4a77dc1bcd777594c67..1f2ddfbf602cfa8c0dca0d81e3f2676904dd4c80:/src/views-components/data-explorer/with-resources.tsx

diff --git a/src/views-components/data-explorer/with-resources.tsx b/src/views-components/data-explorer/with-resources.tsx
index f6670bd6..deeabe95 100644
--- a/src/views-components/data-explorer/with-resources.tsx
+++ b/src/views-components/data-explorer/with-resources.tsx
@@ -2,11 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { connect } from 'react-redux';
-import { RootState } from '~/store/store';
-import { getResource } from '~/store/resources/resources';
-import { Resource } from '~/models/resource';
+import { RootState } from 'store/store';
+import { getResource } from 'store/resources/resources';
+import { Resource } from 'models/resource';
 
 interface WithResourceProps {
     resource?: Resource;
@@ -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)));
