chore(example): remove dev dependencies from example

This commit is contained in:
Bartol Karuza 2019-09-22 13:38:56 +02:00
parent 4469030e6e
commit e4b651c810
1 changed files with 14 additions and 3 deletions

View File

@ -25,8 +25,19 @@ const {
import CameraRoll from '../../js/CameraRoll'; import CameraRoll from '../../js/CameraRoll';
const groupByEveryN = require('groupByEveryN'); const groupByEveryN = function groupByEveryN(num) {
const logError = require('logError'); const n = num;
return arrayArg => {
const array = [...arrayArg];
const result = [];
while (array.length > 0) {
const groupByNumber = array.length >= n ? n : array.length;
result.push(array.splice(0, groupByNumber));
}
return result;
};
};
const logError = console.error;
import type { import type {
PhotoIdentifier, PhotoIdentifier,
@ -144,7 +155,7 @@ class CameraRollView extends React.Component<Props, State> {
} }
} }
const fetchParams: GetPhotosParams = { const fetchParams = {
first: this.props.batchSize, first: this.props.batchSize,
groupTypes: this.props.groupTypes, groupTypes: this.props.groupTypes,
assetType: this.props.assetType, assetType: this.props.assetType,