Skip to content

Commit 8ae3d7f

Browse files
committed
updating how types are imported
1 parent 540df8a commit 8ae3d7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+228
-332
lines changed

app/navigators/AppNavigator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NavigationContainer } from '@react-navigation/native'
2-
import { NativeStackScreenProps } from '@react-navigation/native-stack'
2+
import type { NativeStackScreenProps } from '@react-navigation/native-stack'
33
import React from 'react'
44

55
/**

app/screens/GameDetailsScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { TextStyle, View, ViewStyle } from 'react-native'
2+
import type { TextStyle, ViewStyle } from 'react-native'
3+
import { View } from 'react-native'
34
import { useSafeAreaInsets } from 'react-native-safe-area-context'
45

56
import { colors, sizes } from '../../shared/theme'

app/screens/GamesListScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { TextStyle, View, ViewStyle } from 'react-native'
2+
import type { TextStyle, ViewStyle } from 'react-native'
3+
import { View } from 'react-native'
34
import { useSafeAreaInsets } from 'react-native-safe-area-context'
45

56
import { colors, sizes } from '../../shared/theme'

app/screens/ReviewScreen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { TextStyle, View, ViewStyle } from 'react-native'
2+
import type { TextStyle, ViewStyle } from 'react-native'
3+
import { View } from 'react-native'
34
import { useSafeAreaInsets } from 'react-native-safe-area-context'
45

56
import { colors, sizes } from '../../shared/theme'

msw/handlers/games.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { rest } from 'msw'
22

3-
import { PostGamesParams } from '../../shared/services/types'
3+
import type { PostGamesParams } from '../../shared/services/types'
44
import { gameData, sliceGames, sortGames } from '../utils/prepareGameData'
55

66
export const games = rest.post(

msw/utils/prepareGameData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PostGamesParams } from '../../shared/services/types'
1+
import type { PostGamesParams } from '../../shared/services/types'
22
import rawData from '../mocks/games.json'
33
import { camelCaseKeys } from './camelCaseKeys'
44

shared/utils/trainingHelper.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useMemo, useState } from 'react'
2-
import { DevSettings, Platform, TextStyle } from 'react-native'
2+
import { DevSettings, Platform } from 'react-native'
3+
import type { TextStyle } from 'react-native'
34
import { MMKV } from 'react-native-mmkv'
45

56
import { Text } from '../../solutions/chapter7/components/Text'

shared/utils/useAppState.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* Source: https://github.com/Reykjavik151/react-native-hookbox
44
*/
55
import { useEffect, useState } from 'react'
6-
import { AppState, type AppStateStatus } from 'react-native'
6+
import type { AppStateStatus } from 'react-native'
7+
import { AppState } from 'react-native'
78

89
/**
910
* Get the current app state

solutions/chapter1/components/Card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { Image, type ImageStyle, View, type ViewStyle } from 'react-native'
2+
import type { ImageStyle, ViewStyle } from 'react-native'
3+
import { Image, View } from 'react-native'
34

45
import { colors, sizes } from '../../../shared/theme'
56
import { Icon } from './Icon'

solutions/chapter1/components/Text.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React from 'react'
2-
import {
3-
StyleProp,
4-
Text as RNText,
5-
type TextProps as RNTextProps,
6-
TextStyle,
7-
} from 'react-native'
2+
import type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native'
3+
import { Text as RNText } from 'react-native'
84

95
import { colors, fonts } from '../../../shared/theme'
106

0 commit comments

Comments
 (0)