From cb4a1e31ac2b6d3a4733995a5271766f346d8b92 Mon Sep 17 00:00:00 2001 From: sharpd Date: Fri, 1 Mar 2024 21:24:13 +1300 Subject: [PATCH] update based on feedback Signed-off-by: sharpd --- web/src/components/datasets/DatasetTags.tsx | 14 +++++++------- web/src/helpers/theme.ts | 3 +++ web/src/store/reducers/tags.ts | 8 +++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/web/src/components/datasets/DatasetTags.tsx b/web/src/components/datasets/DatasetTags.tsx index 5ebd404666..245214fa3c 100644 --- a/web/src/components/datasets/DatasetTags.tsx +++ b/web/src/components/datasets/DatasetTags.tsx @@ -82,6 +82,7 @@ const DatasetTags: React.FC = (props) => { options[selectedIndex] === 'Add a Tag' ? setDialogOpen(true) : setOpenTagDesc(true) } const [snackbarOpen, setSnackbarOpen] = useState(false) + const theme = createTheme(useTheme()) const handleMenuItemClick = ( _event: React.MouseEvent, @@ -145,7 +146,6 @@ const DatasetTags: React.FC = (props) => { } const formatTags = (tags: string[], tag_desc: Tag[]) => { - const theme = createTheme(useTheme()) return tags.map((tag) => { const tagDescription = tag_desc.find((tagItem) => tagItem.name === tag) const tooltipTitle = tagDescription?.description || 'No Tag Description' @@ -170,8 +170,8 @@ const DatasetTags: React.FC = (props) => { <> setSnackbarOpen(false)} message={'Tag updated.'} anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }} @@ -182,13 +182,13 @@ const DatasetTags: React.FC = (props) => {