Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Commit 330df3f

Browse files
committed
add content type
1 parent bd1812a commit 330df3f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/components/ContentDropdown/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import DropdownButton from 'react-bootstrap/lib/DropdownButton';
55
import MenuItem from 'react-bootstrap/lib/MenuItem';
66
import LocaleFormattedMessage from 'components/LocaleFormattedMessage';
77
import { loadTranslations } from 'redux/actions/options';
8-
import { translationType } from 'types';
8+
import { contentType } from 'types';
99

1010
const style = require('./style.scss');
1111

@@ -30,7 +30,7 @@ class ContentDropdown extends Component {
3030
static propTypes = {
3131
onOptionChange: PropTypes.func.isRequired,
3232
content: PropTypes.arrayOf(PropTypes.number).isRequired,
33-
translations: PropTypes.arrayOf(translationType),
33+
translations: PropTypes.arrayOf(contentType),
3434
loadTranslations: PropTypes.func.isRequired,
3535
className: PropTypes.string
3636
};

src/types/contentType.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { PropTypes } from 'react';
2+
3+
export default PropTypes.shape({
4+
id: PropTypes.number,
5+
authorName: PropTypes.string,
6+
languageName: PropTypes.string
7+
});

src/types/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ export { default as wordType } from './wordType';
88
export { default as matchType } from './matchType';
99
export { default as recitationType } from './recitationType';
1010
export { default as translationType } from './translationType';
11+
export { default as contentType } from './contentType';

0 commit comments

Comments
 (0)