Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Nalepa committed May 10, 2019
1 parent 8f9dcc7 commit 0f28da4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ContentImagePreviewComponent from './content.image.preview.component';
import BookmarkIconComponent from './bookmark.icon.component';
import ContentTypeIconComponent from './content.type.icon.component';
import ContentTypeIconComponent from '../content-type-icon/content.type.icon.component';

const TEXT_LAST_MODIFIED = Translator.trans(
/*@Desc("Last modified")*/ 'content_meta_preview.last_modified.label',
Expand Down
Expand Up @@ -16,4 +16,8 @@ ContentTypeIconComponent.propTypes = {
identifier: PropTypes.string,
};

ContentTypeIconComponent.defaultProps = {
identifier: null,
};

export default ContentTypeIconComponent;
@@ -1,13 +1,14 @@
import React from 'react';
import PropTypes from 'prop-types';
import Icon from '../../../common/icon/icon';
import ContentTypeIconComponent from '../content-type-icon/content.type.icon.component';

const notAvailableLabel = Translator.trans(/*@Desc("N/A")*/ 'select_content.not_available.label', {}, 'universal_discovery_widget');
const SelectedContentItemComponent = ({ contentName, locationId, contentTypeIdentifier, contentTypeName, onRemove }) => {
let icon = null;

if (contentTypeIdentifier) {
icon = <Icon name={contentTypeIdentifier} extraClasses="c-selected-content-item__icon ez-icon--small" />;
icon = <ContentTypeIconComponent identifier={contentTypeIdentifier} />;
}

return (
Expand Down
5 changes: 5 additions & 0 deletions src/modules/udw/services/bookmark.service.js
Expand Up @@ -88,6 +88,11 @@ export const checkIsBookmarked = (restInfo, locationId, callback) => {
...basicRequestInit,
method: 'HEAD',
});
/** @TODO 10.05.2019
* fix it to receive 200 from backend always
* the information about whether content item is bookmarked
* should come from { bookmarked: true|false }
*/
const bookmarkedStatusCode = 200;
const notBookmarkedStatusCode = 404;

Expand Down

0 comments on commit 0f28da4

Please sign in to comment.