mirror of
https://github.com/status-im/react-native-cameraroll.git
synced 2025-01-12 19:04:13 +00:00
fix(js) import paths
This commit is contained in:
parent
7077b84036
commit
ad3a2216ba
@ -12,7 +12,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactNative = require('react-native');
|
const ReactNative = require('react-native');
|
||||||
const {
|
const {
|
||||||
CameraRoll,
|
|
||||||
Image,
|
Image,
|
||||||
Slider,
|
Slider,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
@ -21,6 +20,8 @@ const {
|
|||||||
View,
|
View,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
} = ReactNative;
|
} = ReactNative;
|
||||||
|
import CameraRoll from '../../js/CameraRoll';
|
||||||
|
import type {PhotoIdentifier, GroupTypes} from '../../js/CameraRoll';
|
||||||
|
|
||||||
const invariant = require('fbjs/lib/invariant');
|
const invariant = require('fbjs/lib/invariant');
|
||||||
|
|
||||||
@ -28,8 +29,6 @@ const CameraRollView = require('./CameraRollView');
|
|||||||
|
|
||||||
const AssetScaledImageExampleView = require('./AssetScaledImageExample');
|
const AssetScaledImageExampleView = require('./AssetScaledImageExample');
|
||||||
|
|
||||||
import type {PhotoIdentifier, GroupTypes} from 'CameraRoll';
|
|
||||||
|
|
||||||
type Props = $ReadOnly<{|
|
type Props = $ReadOnly<{|
|
||||||
navigator?: ?Array<
|
navigator?: ?Array<
|
||||||
$ReadOnly<{|
|
$ReadOnly<{|
|
||||||
@ -54,6 +53,7 @@ export default class CameraRollExample extends React.Component<Props, State> {
|
|||||||
bigImages: true,
|
bigImages: true,
|
||||||
};
|
};
|
||||||
_cameraRollView: ?React.ElementRef<typeof CameraRollView>;
|
_cameraRollView: ?React.ElementRef<typeof CameraRollView>;
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
|
@ -15,7 +15,6 @@ const ReactNative = require('react-native');
|
|||||||
const {
|
const {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Alert,
|
Alert,
|
||||||
CameraRoll,
|
|
||||||
Image,
|
Image,
|
||||||
FlatList,
|
FlatList,
|
||||||
PermissionsAndroid,
|
PermissionsAndroid,
|
||||||
@ -24,6 +23,8 @@ const {
|
|||||||
View,
|
View,
|
||||||
} = ReactNative;
|
} = ReactNative;
|
||||||
|
|
||||||
|
import CameraRoll from '../../js/CameraRoll';
|
||||||
|
|
||||||
const groupByEveryN = require('groupByEveryN');
|
const groupByEveryN = require('groupByEveryN');
|
||||||
const logError = require('logError');
|
const logError = require('logError');
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ import type {
|
|||||||
PhotoIdentifier,
|
PhotoIdentifier,
|
||||||
PhotoIdentifiersPage,
|
PhotoIdentifiersPage,
|
||||||
GetPhotosParams,
|
GetPhotosParams,
|
||||||
} from 'CameraRoll';
|
} from '../../js/CameraRoll';
|
||||||
|
|
||||||
type Props = $ReadOnly<{|
|
type Props = $ReadOnly<{|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const {checkPropTypes} = PropTypes;
|
const {checkPropTypes} = PropTypes;
|
||||||
const RNCCameraRoll = require('nativeInterface');
|
const RNCCameraRoll = require('./nativeInterface');
|
||||||
const deprecatedCreateStrictShapeTypeChecker = require('deprecatedCreateStrictShapeTypeChecker');
|
const deprecatedCreateStrictShapeTypeChecker = require('deprecatedCreateStrictShapeTypeChecker');
|
||||||
const invariant = require('fbjs/lib/invariant');
|
const invariant = require('fbjs/lib/invariant');
|
||||||
|
|
||||||
|
@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
import CameraRoll from '../CameraRoll';
|
import CameraRoll from '../CameraRoll';
|
||||||
|
|
||||||
const NativeModule = require('nativeInterface');
|
const NativeModule = require('../nativeInterface');
|
||||||
|
|
||||||
|
jest.mock('../nativeInterface');
|
||||||
|
|
||||||
describe('CameraRoll', () => {
|
describe('CameraRoll', () => {
|
||||||
it('Should call deletePhotos', () => {
|
it('Should call deletePhotos', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user