Skip to content

Commit 9ad3f5e

Browse files
committed
get rid of some shadowing
1 parent c10e858 commit 9ad3f5e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"build": "tsc",
1010
"test": "jest",
1111
"lint": "eslint src/**/*.ts",
12+
"eslint-fix": "eslint src/**/*.ts --fix",
1213
"prettier-fix": "prettier --write \"**/*.{ts,tsx}\"",
1314
"release": "auto shipit",
1415
"release-canary": "auto canary"

src/useCameraRoll.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export function useCameraRoll() {
2020

2121
async function getPhotos(config = defaultConfig) {
2222
try {
23-
const photos = await CameraRoll.getPhotos(config)
24-
setPhotos(photos)
23+
const result = await CameraRoll.getPhotos(config)
24+
setPhotos(result)
2525
} catch (err) {
2626
console.log('error: ', err)
2727
}

src/useDeviceOrientation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ export function useDeviceOrientation() {
2424
landscape: isOrientationLandscape(screen),
2525
})
2626

27-
const onChange = useCallback(({screen}: {screen: ScaledSize}) => {
27+
const onChange = useCallback(({screen: scr}: {screen: ScaledSize}) => {
2828
setOrientation({
29-
portrait: isOrientationPortrait(screen),
30-
landscape: isOrientationLandscape(screen),
29+
portrait: isOrientationPortrait(scr),
30+
landscape: isOrientationLandscape(scr),
3131
})
3232
}, [])
3333

0 commit comments

Comments
 (0)