Try to get views to work for component library
This commit is contained in:
1 parent
ff28a2264b
commit
ca7506c5f0
19 files changed
+694
-382
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import studyListMock from '../mocks/studyList';
|
||||
|
||||
/** Values can be env vars */
|
||||
const DEFAULT_MOCKED_STUDIES_LIMIT = 1000;
|
||||
|
||||
/**
|
||||
* Method to get a mocked study list
|
||||
* @param {number} items Number of studies to be loaded
|
||||
* @returns {array} Study list
|
||||
*/
|
||||
const getMockedStudies = (items = 50) => {
|
||||
const num =
|
||||
items > DEFAULT_MOCKED_STUDIES_LIMIT ? DEFAULT_MOCKED_STUDIES_LIMIT : items;
|
||||
return new Array(num).fill(studyListMock.studies[0]);
|
||||
};
|
||||
|
||||
export default getMockedStudies;
|
||||
@@ -0,0 +1,7 @@
|
||||
import getMockedStudies from './getMockedStudies';
|
||||
|
||||
const utils = { getMockedStudies };
|
||||
|
||||
export { getMockedStudies };
|
||||
|
||||
export default utils;
|
||||
Reference in new issue
Block a user