fix(js) import paths

This commit is contained in:
Bartol Karuza 2019-03-03 18:54:13 +08:00
parent 7077b84036
commit ad3a2216ba
4 changed files with 10 additions and 7 deletions

View File

@ -12,7 +12,6 @@
const React = require('react');
const ReactNative = require('react-native');
const {
CameraRoll,
Image,
Slider,
StyleSheet,
@ -21,6 +20,8 @@ const {
View,
TouchableOpacity,
} = ReactNative;
import CameraRoll from '../../js/CameraRoll';
import type {PhotoIdentifier, GroupTypes} from '../../js/CameraRoll';
const invariant = require('fbjs/lib/invariant');
@ -28,8 +29,6 @@ const CameraRollView = require('./CameraRollView');
const AssetScaledImageExampleView = require('./AssetScaledImageExample');
import type {PhotoIdentifier, GroupTypes} from 'CameraRoll';
type Props = $ReadOnly<{|
navigator?: ?Array<
$ReadOnly<{|
@ -54,6 +53,7 @@ export default class CameraRollExample extends React.Component<Props, State> {
bigImages: true,
};
_cameraRollView: ?React.ElementRef<typeof CameraRollView>;
render() {
return (
<View>

View File

@ -15,7 +15,6 @@ const ReactNative = require('react-native');
const {
ActivityIndicator,
Alert,
CameraRoll,
Image,
FlatList,
PermissionsAndroid,
@ -24,6 +23,8 @@ const {
View,
} = ReactNative;
import CameraRoll from '../../js/CameraRoll';
const groupByEveryN = require('groupByEveryN');
const logError = require('logError');
@ -31,7 +32,7 @@ import type {
PhotoIdentifier,
PhotoIdentifiersPage,
GetPhotosParams,
} from 'CameraRoll';
} from '../../js/CameraRoll';
type Props = $ReadOnly<{|
/**

View File

@ -11,7 +11,7 @@
const PropTypes = require('prop-types');
const {checkPropTypes} = PropTypes;
const RNCCameraRoll = require('nativeInterface');
const RNCCameraRoll = require('./nativeInterface');
const deprecatedCreateStrictShapeTypeChecker = require('deprecatedCreateStrictShapeTypeChecker');
const invariant = require('fbjs/lib/invariant');

View File

@ -11,7 +11,9 @@
import CameraRoll from '../CameraRoll';
const NativeModule = require('nativeInterface');
const NativeModule = require('../nativeInterface');
jest.mock('../nativeInterface');
describe('CameraRoll', () => {
it('Should call deletePhotos', () => {