Skip to content

Commit

Permalink
✨ Hide path tag from tag list
Browse files Browse the repository at this point in the history
  • Loading branch information
XuTheBunny committed Feb 26, 2021
1 parent ef0956f commit d85501a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/documents/components/FileDetail/FileTags.js
Expand Up @@ -11,6 +11,9 @@ const FileTags = ({fileNode, updateFile, defaultOptions}) => {
const [more, setMore] = useState(false);
const [open, setOpen] = useState(false);
const [error, setError] = useState('');

const pathTag = fileNode.tags.find(t => t.includes('PATH_'));

const handleAddition = (e, {value}) => {
if (fileNode.tags.includes(value)) {
setError('Tag already exist');
Expand Down Expand Up @@ -52,6 +55,7 @@ const FileTags = ({fileNode, updateFile, defaultOptions}) => {
<Label.Group>
{fileNode.tags.length > 0 ? (
fileNode.tags
.filter(t => !t.includes('PATH'))
.slice(0, more ? fileNode.tags.length : 5)
.map((tag, index) => (
<Label
Expand Down

0 comments on commit d85501a

Please sign in to comment.