Skip to content

Commit

Permalink
fix: add missing files to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-Torrent committed Oct 13, 2021
1 parent 08c5606 commit 1c1963a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,12 @@ export const SETTINGS = {
ITEM_PUBLIC: {
name: 'public-item',
},
ITEM_PINNED: {
name: 'item-pinned',
ITEM_PUBLISHED: {
name: 'published-item',
},
// this tag doesn't exist but is used if none of the visiblity tag is set
ITEM_PRIVATE: {
name: 'private-item',
},
};

Expand Down
6 changes: 0 additions & 6 deletions src/utils/itemTag.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { SETTINGS } from '../config/constants';

export const getItemPinnedTag = (tags) =>
tags?.find(({ name }) => name === SETTINGS.ITEM_PINNED.name);

export const isItemPinned = ({ tags, itemTags }) =>
Boolean(itemTags?.find(({ tagId }) => tagId === getItemPinnedTag(tags)?.id));

export const getItemLoginTag = (tags) =>
tags?.find(({ name }) => name === SETTINGS.ITEM_LOGIN.name);

Expand Down

0 comments on commit 1c1963a

Please sign in to comment.