Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 4ca0b34

Browse files
committed
bump expo sdk version to 42
1 parent c727d54 commit 4ca0b34

File tree

16 files changed

+12065
-12725
lines changed

16 files changed

+12065
-12725
lines changed

.github/workflows/CI.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
- name: Use Node.js ${{ matrix.node-version }}
1414
uses: actions/setup-node@v2-beta
1515
with:
16-
node-version: 12
17-
- uses: actions/cache@v2.2.0
16+
node-version: 14
17+
- uses: actions/cache@v2.1.6
1818
with:
1919
path: |
2020
~/.npm
@@ -23,9 +23,9 @@ jobs:
2323
restore-keys: |
2424
${{ runner.os }}-node-
2525
- name: Expo GitHub Action
26-
uses: expo/expo-github-action@v6.0.0
26+
uses: expo/expo-github-action@5.5.1
2727
with:
28-
token: ${{ secrets.EXPO_CLI_TOKEN }}
28+
expo-token: ${{ secrets.EXPO_CLI_TOKEN }}
2929
expo-cache: true
3030
packager: npm
3131
- run: echo '${{ secrets.APP_JSON }}' > app.json
@@ -45,7 +45,7 @@ jobs:
4545
if: github.ref != 'refs/heads/master'
4646
run: |
4747
expo publish --release-channel=dev.commit-${{ github.sha }}
48-
- uses: unsplash/comment-on-pr@main
48+
- uses: unsplash/comment-on-pr@master
4949
if: github.ref != 'refs/heads/master' # don't try to comment on master
5050
env:
5151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

configureStore.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ const appReducer = combineReducers({
3838
...otherReducers,
3939
})
4040

41-
export type AppStateType = ReturnType<typeof appReducer>
42-
4341
const rootReducer = (state, action) => appReducer(
4442
action.type === SIGN_OUT_USER ? undefined : state, action,
4543
)
@@ -48,9 +46,12 @@ const persistRootReducer = persistReducer(config, rootReducer)
4846

4947
const store = createStore(
5048
persistRootReducer,
51-
initialState,
49+
initialState as unknown,
5250
applyMiddleware(...middleware),
5351
)
52+
53+
export type AppStateType = ReturnType<typeof store.getState>
54+
5455
const persistor = persistStore(store)
5556

5657
export default { persistor, store }

lib/MapsManager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Linking } from "react-native"
1+
import * as Linking from 'expo-linking'
22

33
const navigateToCoords = ({ lat, lng }): void => {
44
const url = `https://www.google.com/maps/search/?api=1&query=${lat},${lng}`

lib/PushNotificationsManager.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import axios from "axios"
22
import Constants from "expo-constants"
33
import * as Notifications from "expo-notifications"
4-
import * as Permissions from "expo-permissions"
54

65
import { ASSISTANT_API_URL } from "../constants/API"
76
import AnalyticsManager from "./AnalyticsManager"
@@ -16,16 +15,14 @@ const registerForPushNotifications = async (token: string): Promise<string> => {
1615
return ``
1716
}
1817

19-
const { status: existingStatus } = await Permissions.getAsync(
20-
Permissions.NOTIFICATIONS,
21-
)
18+
const { status: existingStatus } = await Notifications.getPermissionsAsync()
2219

2320
let finalStatus = existingStatus
2421

2522
// only ask if permissions have not already been determined, because
2623
// iOS won't necessarily prompt the user a second time.
2724
if (existingStatus !== `granted`) {
28-
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS)
25+
const { status } = await Notifications.getPermissionsAsync()
2926
finalStatus = status
3027
}
3128

@@ -78,7 +75,7 @@ const registerForPushNotifications = async (token: string): Promise<string> => {
7875
const hasPushNotificationPermissions = async (): Promise<boolean> => {
7976
let result
8077
try {
81-
result = await Permissions.getAsync(Permissions.NOTIFICATIONS)
78+
result = await Notifications.getPermissionsAsync()
8279
} catch (error) {
8380
ErrorManager.captureError(error)
8481
throw new Error(`Failed to check if push notifications permissions granted`)

0 commit comments

Comments
 (0)