From 055f629cab674e640e4fa14945c5a2fa746ccf60 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Fri, 12 Nov 2021 22:13:30 +0530 Subject: [PATCH] Improvement: made UI of disable button for teams and tags page same as services page (#1170) --- .../main/resources/ui/src/pages/tags/index.tsx | 15 +++++++++++---- .../main/resources/ui/src/pages/teams/index.tsx | 9 +++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/catalog-rest-service/src/main/resources/ui/src/pages/tags/index.tsx b/catalog-rest-service/src/main/resources/ui/src/pages/tags/index.tsx index 360990c98a2..01f24ac68c1 100644 --- a/catalog-rest-service/src/main/resources/ui/src/pages/tags/index.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/pages/tags/index.tsx @@ -16,6 +16,7 @@ */ import { AxiosError, AxiosResponse } from 'axios'; +import classNames from 'classnames'; import { EntityTags } from 'Models'; import React, { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; @@ -44,12 +45,14 @@ import { TagCategoryType, } from '../../generated/api/tags/createTagCategory'; import { TagCategory, TagClass } from '../../generated/entity/tags/tagCategory'; +import { useAuth } from '../../hooks/authHooks'; import { isEven } from '../../utils/CommonUtils'; import SVGIcons from '../../utils/SvgUtils'; import { getTagCategories, getTaglist } from '../../utils/TagsUtils'; import Form from './Form'; // import { Tag, TagsCategory } from './tagsTypes'; const TagsPage = () => { + const { isAuthDisabled, isAdminUser } = useAuth(); const [categories, setCategoreis] = useState>([]); const [currentCategory, setCurrentCategory] = useState(); const [isEditCategory, setIsEditCategory] = useState(false); @@ -183,7 +186,9 @@ const TagsPage = () => {
Tag Categories