From 1b86b0917c963dbfbf111b670c10fa9e710e1c54 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 7 Sep 2025 19:46:45 +0100 Subject: [PATCH] Display objects in tags. --- .../Dashboard/common/ObjectDisplay.jsx | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/components/Dashboard/common/ObjectDisplay.jsx b/src/components/Dashboard/common/ObjectDisplay.jsx index a23a1a8..87bf27a 100644 --- a/src/components/Dashboard/common/ObjectDisplay.jsx +++ b/src/components/Dashboard/common/ObjectDisplay.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Typography, Flex, Badge } from 'antd' +import { Typography, Flex, Badge, Tag } from 'antd' import { useState, useEffect, useContext, useCallback } from 'react' import { getModelByName } from '../../../database/ObjectModels' import { ApiServerContext } from '../context/ApiServerContext' @@ -53,19 +53,25 @@ const ObjectDisplay = ({ object, objectType }) => { const model = getModelByName(objectType) const Icon = model.icon return ( - - - {objectData?.color ? : null} - {objectData?.name ? {objectData.name} : null} - {objectData?._id && !objectData?.name ? ( - - ) : null} - + + + + + {objectData?.color ? : null} +
+ {objectData?.name ? {objectData.name} : null} + {objectData?._id && !objectData?.name ? ( + + ) : null} +
+
+
+
) }