diff --git a/app/src/Tags.js b/app/src/Tags.js index 8710cfdb..253594e6 100644 --- a/app/src/Tags.js +++ b/app/src/Tags.js @@ -4,7 +4,8 @@ import { Button as SButton, Confirm, Dimmer, - Divider, Dropdown, + Divider, + Dropdown, Form, FormInput, Grid, @@ -164,6 +165,13 @@ function EditTagsModal() { const [tagColor, setTagColor] = useState(DEFAULT_TAG_COLOR); const textColor = contrastingColor(tagColor); + const localOnClose = () => { + setOpen(false); + setTagName(''); + setTagColor(null); + setTagId(null); + } + const localDeleteTag = async (id, name) => { await deleteTag(id, name); if (fetchTags) { @@ -197,7 +205,7 @@ function EditTagsModal() { setOpen(true)} - onClose={() => setOpen(false)} + onClose={localOnClose} > Edit Tags @@ -389,11 +397,3 @@ export const TagsDropdown = ({value = [], onChange, ...props}) => { {...props} /> } - -export const TagsProvider = ({children}) => { - const value = useTagsInterval(); - - return - {children} - -}