debian-mirror-gitlab/app/assets/javascripts/groups/store/utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
660 B
JavaScript
Raw Normal View History

2021-02-22 17:27:13 +05:30
export const getGroupItemMicrodata = ({ type }) => {
const defaultMicrodata = {
itemscope: true,
itemtype: 'https://schema.org/Thing',
itemprop: 'owns',
imageItemprop: 'image',
nameItemprop: 'name',
descriptionItemprop: 'description',
};
switch (type) {
case 'group':
return {
...defaultMicrodata,
itemtype: 'https://schema.org/Organization',
itemprop: 'subOrganization',
imageItemprop: 'logo',
};
case 'project':
return {
...defaultMicrodata,
itemtype: 'https://schema.org/SoftwareSourceCode',
};
default:
return defaultMicrodata;
}
};