Skip to content

Commit

Permalink
Highlight tag if it contains mature word
Browse files Browse the repository at this point in the history
  • Loading branch information
miko committed Jan 7, 2025
1 parent 0494b75 commit 3baa08f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/component/tag/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Props = {

export default function Tag(props: Props) {
const { name, onClick, type = 'link', disabled = false } = props;
const isMature = MATURE_TAGS.includes(name);
const isMature = name.split(' ').some((word) => MATURE_TAGS.includes(word));
const clickProps = onClick ? { onClick } : { navigate: `/$/${PAGES.DISCOVER}?t=${encodeURIComponent(name)}` };

let title;
Expand Down

0 comments on commit 3baa08f

Please sign in to comment.