Skip to content

Commit

Permalink
upgrade react-native, remove react-native-dark-mode, upgrade gradle p…
Browse files Browse the repository at this point in the history
…lugin
  • Loading branch information
syuraj committed Sep 19, 2022
1 parent 42b9d91 commit a3bad13
Show file tree
Hide file tree
Showing 8 changed files with 648 additions and 459 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ dependencies {
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
from configurations.implementation
into 'libs'
}

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
google()
}
dependencies {
classpath('com.android.tools.build:gradle:4.1.0')
classpath('com.android.tools.build:gradle:7.0.4')

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3 changes: 1 addition & 2 deletions app/components/Header/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Text from '@components/Text'
import PropTypes from 'prop-types'
import React, { useEffect } from 'react'
import { StatusBar, TouchableOpacity, View } from 'react-native'
import { useDarkMode } from 'react-native-dark-mode'
import styles from './styles'

export default function Header(props) {
Expand All @@ -25,7 +24,7 @@ export default function Header(props) {
renderRight,
barStyle,
} = props
const isDarkMode = useDarkMode()
const isDarkMode = false

useEffect(() => {
let option = isDarkMode ? 'light-content' : 'dark-content'
Expand Down
4 changes: 1 addition & 3 deletions app/config/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { useDarkMode } from 'react-native-dark-mode'

/**
* Define Const color use for whole application
*/
Expand Down Expand Up @@ -220,7 +218,7 @@ export const DefaultFont = 'OpenSans'
* @returns theme,colors
*/
export const useTheme = () => {
const isDarkMode = useDarkMode()
const isDarkMode = false
const forceDark = false
const listTheme = ThemeSupport.filter((item) => item.theme == 'orange')
const theme = listTheme.length > 0 ? listTheme[0] : DefaultTheme
Expand Down
7 changes: 2 additions & 5 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Provider as PaperProvider } from 'react-native-paper'
import theme from './config/theme-paper'
import { ApolloProvider } from '@apollo/client'
import SplashScreen from 'react-native-splash-screen'
import { DarkModeProvider, useDarkMode } from 'react-native-dark-mode'
import store from './store'
import GraphqlClient from './graphql/graphql-client'
import App from './navigation'
Expand All @@ -16,7 +15,7 @@ console.disableYellowBox = true
Utils.setupLayoutAnimation()

const NTApp = () => {
const isDarkMode = useDarkMode()
const isDarkMode = false

useEffect(() => {
SplashScreen.hide()
Expand All @@ -34,9 +33,7 @@ const NTApp = () => {
<PaperProvider theme={theme}>
<SafeAreaProvider>
<ReduxProvider store={store}>
<DarkModeProvider>
<App />
</DarkModeProvider>
<App />
</ReduxProvider>
</SafeAreaProvider>
</PaperProvider>
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@
"moment": "^2.29.1",
"prop-types": "^15.7.2",
"react": "17.0.1",
"react-native": "0.64.1",
"react-native": "0.68.3",
"react-native-action-button": "^2.8.5",
"react-native-animatable": "^1.3.3",
"react-native-dark-mode": "^0.2.2",
"react-native-dotenv": "^3.3.1",
"react-native-fast-image": "^8.3.4",
"react-native-gesture-handler": "~1.10.3",
"react-native-localize": "^2.2.2",
"react-native-pager-view": "^6.0.0",
"react-native-paper": "5.0.0-rc.5",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "~2.1.0",
"react-native-reanimated": "~2.10.0",
"react-native-restart": "0.0.22",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "3.4.0",
Expand Down
1,082 changes: 639 additions & 443 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit a3bad13

Please sign in to comment.