Skip to content

Commit

Permalink
Merge remote-tracking branch 'xcap/rewrite/functionnal_component' int…
Browse files Browse the repository at this point in the history
…o rewrite/functional_component/GiftedChat
  • Loading branch information
myckhel committed Apr 26, 2021
2 parents f17a5a6 + 09952a0 commit ecd5733
Show file tree
Hide file tree
Showing 6 changed files with 3,409 additions and 1,711 deletions.
3 changes: 2 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MaterialIcons } from '@expo/vector-icons'
import { AppLoading, Asset, Linking } from 'expo'
import { Asset, Linking } from 'expo'
import AppLoading from 'expo-app-loading'
import React, { Component } from 'react'
import { StyleSheet, View, Text, Platform } from 'react-native'
import {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions example-expo/mediaUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default async function getPermissionAsync(permission) {
}

export async function getLocationAsync(onSend) {
if (await getPermissionAsync(Permissions.LOCATION)) {
if (await Location.requestForegroundPermissionsAsync()) {
const location = await Location.getCurrentPositionAsync({})
if (location) {
onSend([{ location: location.coords }])
Expand All @@ -37,7 +37,7 @@ export async function getLocationAsync(onSend) {
}

export async function pickImageAsync(onSend) {
if (await getPermissionAsync(Permissions.CAMERA_ROLL)) {
if (await ImagePicker.requestMediaLibraryPermissionsAsync()) {
const result = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true,
aspect: [4, 3],
Expand All @@ -51,7 +51,7 @@ export async function pickImageAsync(onSend) {
}

export async function takePictureAsync(onSend) {
if (await getPermissionAsync(Permissions.CAMERA)) {
if (await ImagePicker.requestCameraPermissionsAsync()) {
const result = await ImagePicker.launchCameraAsync({
allowsEditing: true,
aspect: [4, 3],
Expand Down
35 changes: 18 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,42 +68,43 @@
]
},
"devDependencies": {
"@babel/core": "7.9.6",
"@babel/core": "~7.9.0",
"@babel/preset-typescript": "7.9.0",
"@types/jest": "25.2.1",
"@types/react": "^16.9.11",
"@types/react-native": "^0.60.22",
"@types/react": "~16.9.35",
"@types/react-native": "~0.63.2",
"@types/react-native-communications": "2.2.1",
"@types/react-test-renderer": "16.9.2",
"@types/uuid": "3.4.9",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "25.5.1",
"babel-preset-expo": "^8.1.0",
"expo": "^37.0.0",
"expo-constants": "~9.0.0",
"expo-image-picker": "~8.1.0",
"expo-location": "~8.1.0",
"expo-permissions": "~8.1.0",
"babel-preset-expo": "8.3.0",
"expo": "^41.0.0",
"expo-constants": "~10.1.3",
"expo-image-picker": "~10.1.4",
"expo-location": "~12.0.4",
"expo-permissions": "~12.0.1",
"flow-bin": "0.125.0",
"husky": "4.2.5",
"jest-expo": "^37.0.0",
"jest-expo": "^41.0.0",
"json": "9.0.6",
"prettier": "2.0.5",
"react": "16.9.0",
"react-dom": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
"react-native-maps": "0.26.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "0.63.4",
"react-native-maps": "0.27.1",
"react-native-nav": "2.0.2",
"react-native-web": "^0.11.7",
"react-native-web": "~0.13.12",
"react-native-web-maps": "0.2.0",
"react-test-renderer": "16.9.0",
"tslint": "6.1.2",
"tslint-config-prettier": "1.18.0",
"typescript": "^3.8.3"
"typescript": "~4.0.0"
},
"dependencies": {
"@expo/react-native-action-sheet": "^3.6.0",
"dayjs": "^1.8.26",
"expo-app-loading": "^1.0.3",
"prop-types": "^15.7.2",
"react-native-communications": "^2.2.1",
"react-native-iphone-x-helper": "^1.3.1",
Expand All @@ -123,4 +124,4 @@
"pre-commit": "yarn lint:fix && yarn prettier && yarn tsc"
}
}
}
}
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
"resolveJsonModule": true,
"noFallthroughCasesInSwitch": true,
"strictPropertyInitialization": false,
"lib": ["es6"],
"typeRoots": ["./node_modules/@types", "./@types"]
"lib": [
"es6"
],
"typeRoots": [
"./node_modules/@types",
"./@types"
]
},
"include": [
"src",
Expand Down
Loading

0 comments on commit ecd5733

Please sign in to comment.