add non-mod approved warning

This commit is contained in:
Brandon Thomas committed 2021-12-31 05:51:25 -05:00
1 parent 57886c745a
commit d9b9849344
1 file changed
+16 -1
@@ -7,7 +7,7 @@ import { GetTtsModel, GetTtsModelIsErr, GetTtsModelIsOk, TtsModel, TtsModelLooku
import { ListTtsCategories, ListTtsCategoriesIsError, ListTtsCategoriesIsOk, TtsCategory } from '../../../api/category/ListTtsCategories';
import { ListTtsCategoriesForModel, ListTtsCategoriesForModelIsError, ListTtsCategoriesForModelIsOk, TtsModelCategory } from '../../../api/category/ListTtsCategoriesForModel';
import { SessionWrapper } from '../../../../session/SessionWrapper';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { faExclamationCircle, faTimes } from '@fortawesome/free-solid-svg-icons';
import { useParams } from 'react-router-dom';
interface Props {
@@ -124,9 +124,24 @@ function TtsEditCategoriesPage(props: Props) {
currentCategoriesList = (
<>
{assignedCategories.map(category => {
let notApprovedWarning = null;
if (!category.is_mod_approved) {
notApprovedWarning = (
<>
<span className="tag is-rounded is-warning is-medium is-light">
Not Mod Approved
&nbsp;
<FontAwesomeIcon icon={faExclamationCircle} />
</span>
</>
)
}
return (
<li>
<span className="content is-medium">{category.name}</span>
{notApprovedWarning}
&nbsp;
<button
className="button is-rounded is-danger is-small is-light"