From 0428ffe567bd96c9e45012efeb883d4d0452332a Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Mon, 10 Jan 2022 15:50:54 +0100 Subject: Use observation summary in list view Exact content TBD --- src/components/ObjectComponent.js | 54 ++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 24 deletions(-) (limited to 'src/components/ObjectComponent.js') diff --git a/src/components/ObjectComponent.js b/src/components/ObjectComponent.js index 5074aa9..9650c86 100644 --- a/src/components/ObjectComponent.js +++ b/src/components/ObjectComponent.js @@ -42,36 +42,25 @@ class ObjectComponent extends React.Component { - - {this.props.user_presentation.description && ( - - {this.props.user_presentation.description} - - )} - - + {!this.props.summary &&
} ); } } -function GenericTable(props) { +function Details(props) { return ( - - - {Object.entries(props.data).map(([key, value]) => { - return ( - - - - - ); - })} - -
{key}{value}
+ <> + {props.user_presentation.description && ( + + {props.user_presentation.description} + + )} + + ); } @@ -105,4 +94,21 @@ function UserPresentationElement(props) { ); } +function GenericTable(props) { + return ( + + + {Object.entries(props.data).map(([key, value]) => { + return ( + + + + + ); + })} + +
{key}{value}
+ ); +} + export default ObjectComponent; -- cgit v1.1