Skip to content

Commit c0152b2

Browse files
Merge pull request #23 from creativetimofficial/v1.5.0
V1.5.0
2 parents 68b4112 + f085332 commit c0152b2

File tree

8 files changed

+95
-50
lines changed

8 files changed

+95
-50
lines changed

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
{}
2+

App.js

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import React from "react";
1+
import React, {useState} from "react";
22
import { Image } from "react-native";
33
import { AppLoading } from "expo";
4+
import { useFonts } from '@use-expo/font';
45
import { Asset } from "expo-asset";
56
import { Block, GalioProvider } from "galio-framework";
67
import { NavigationContainer } from "@react-navigation/native";
@@ -36,44 +37,85 @@ function cacheImages(images) {
3637
});
3738
}
3839

39-
export default class App extends React.Component {
40-
state = {
41-
isLoadingComplete: false
42-
};
43-
44-
render() {
45-
if (!this.state.isLoadingComplete) {
46-
return (
47-
<AppLoading
48-
startAsync={this._loadResourcesAsync}
49-
onError={this._handleLoadingError}
50-
onFinish={this._handleFinishLoading}
51-
/>
52-
);
53-
} else {
54-
return (
55-
<NavigationContainer>
56-
<GalioProvider theme={argonTheme}>
57-
<Block flex>
58-
<Screens />
59-
</Block>
60-
</GalioProvider>
61-
</NavigationContainer>
62-
);
63-
}
64-
}
40+
export default props => {
41+
const [isLoadingComplete, setLoading] = useState(false);
42+
let [fontsLoaded] = useFonts({
43+
'ArgonExtra': require('./assets/font/argon.ttf'),
44+
});
6545

66-
_loadResourcesAsync = async () => {
46+
function _loadResourcesAsync() {
6747
return Promise.all([...cacheImages(assetImages)]);
68-
};
48+
}
6949

70-
_handleLoadingError = error => {
50+
function _handleLoadingError(error) {
7151
// In this case, you might want to report the error to your error
7252
// reporting service, for example Sentry
7353
console.warn(error);
7454
};
7555

76-
_handleFinishLoading = () => {
77-
this.setState({ isLoadingComplete: true });
56+
function _handleFinishLoading() {
57+
setLoading(true);
7858
};
59+
60+
if(!fontsLoaded && !isLoadingComplete) {
61+
return (
62+
<AppLoading
63+
startAsync={_loadResourcesAsync}
64+
onError={_handleLoadingError}
65+
onFinish={_handleFinishLoading}
66+
/>
67+
);
68+
} else if(fontsLoaded) {
69+
return (
70+
<NavigationContainer>
71+
<GalioProvider theme={argonTheme}>
72+
<Block flex>
73+
<Screens />
74+
</Block>
75+
</GalioProvider>
76+
</NavigationContainer>
77+
);
78+
}
7979
}
80+
81+
// export default class App extends React.Component {
82+
// state = {
83+
// isLoadingComplete: false
84+
// };
85+
86+
// render() {
87+
// if (!this.state.isLoadingComplete) {
88+
// return (
89+
// <AppLoading
90+
// startAsync={this._loadResourcesAsync}
91+
// onError={this._handleLoadingError}
92+
// onFinish={this._handleFinishLoading}
93+
// />
94+
// );
95+
// } else {
96+
// return (
97+
// <NavigationContainer>
98+
// <GalioProvider theme={argonTheme}>
99+
// <Block flex>
100+
// <Screens />
101+
// </Block>
102+
// </GalioProvider>
103+
// </NavigationContainer>
104+
// );
105+
// }
106+
// }
107+
108+
// _loadResourcesAsync = async () => {
109+
// return Promise.all([...cacheImages(assetImages)]);
110+
// };
111+
112+
// _handleLoadingError = error => {
113+
// // In this case, you might want to report the error to your error
114+
// // reporting service, for example Sentry
115+
// console.warn(error);
116+
// };
117+
118+
// _handleFinishLoading = () => {
119+
// this.setState({ isLoadingComplete: true });
120+
// };
121+
// }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [Argon React Native](https://creativetimofficial.github.io/argon-react-native/docs/#) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/home?status=Argon%20React%20Native,%20a%20cool%20Argon%20React%20Native%20App%20Template%20%E2%9D%A4%EF%B8%8F%20https%3A//bit.ly/2KAj86H%20%23reactnative%20%23argon%20%23designsystem%20%23developers%20via%20%40CreativeTim)
22

33

4-
![version](https://img.shields.io/badge/version-1.4.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/argon-react-native.svg?style=flat)](https://github.com/creativetimofficial/argon-react-native/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/argon-react-native.svg?maxAge=2592000)](https://github.com/creativetimofficial/argon-react-native/issues?q=is%3Aissue+is%3Aclosed)
4+
![version](https://img.shields.io/badge/version-1.5.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/argon-react-native.svg?style=flat)](https://github.com/creativetimofficial/argon-react-native/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/argon-react-native.svg?maxAge=2592000)](https://github.com/creativetimofficial/argon-react-native/issues?q=is%3Aissue+is%3Aclosed)
55

66

77
![Product Gif](https://raw.githubusercontent.com/creativetimofficial/public-assets/master/argon-react-native/arg-rn-thumbnail.jpg)
@@ -162,7 +162,7 @@ If you have questions or need help integrating the product please [contact us](h
162162

163163
## Licensing
164164

165-
- Copyright 2019 Creative Tim (https://www.creative-tim.com/)
165+
- Copyright 2020 Creative Tim (https://www.creative-tim.com/)
166166

167167
- Licensed under MIT (https://github.com/creativetimofficial/argon-react-native/blob/master/LICENSE.md)
168168

app.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"name": "Argon FREE React Native",
44
"slug": "argon-free-react-native",
55
"privacy": "public",
6-
"sdkVersion": "36.0.0",
6+
"sdkVersion": "37.0.0",
77
"platforms": [
88
"ios",
99
"android"
1010
],
11-
"version": "1.4.0",
11+
"version": "1.5.0",
1212
"orientation": "portrait",
1313
"icon": "./assets/icon.png",
1414
"splash": {
@@ -24,6 +24,7 @@
2424
],
2525
"ios": {
2626
"supportsTablet": true
27-
}
27+
},
28+
"description": "Argon React Native, based on Argon Design System. Coded by Creative Tim"
2829
}
2930
}

components/DrawerItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { StyleSheet, TouchableOpacity } from "react-native";
2+
import { StyleSheet, TouchableOpacity, Linking } from "react-native";
33
import { Block, Text, theme } from "galio-framework";
44

55
import Icon from "./Icon";

components/Icon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as Font from 'expo-font';
33
import { createIconSetFromIcoMoon } from '@expo/vector-icons';
44
import { Icon } from 'galio-framework';
55

6-
import argonConfig from '../assets/font/argon.json';
6+
import argonConfig from '../assets/config/argon.json';
77
const ArgonExtra = require('../assets/font/argon.ttf');
88
const IconArgonExtra = createIconSetFromIcoMoon(argonConfig, 'ArgonExtra');
99

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "argon-react-native",
3-
"version": "1.4.0",
3+
"version": "1.5.0",
44
"description": "Argon React Native, based on Argon Design System. Coded by Creative Tim",
55
"main": "node_modules/expo/AppEntry.js",
66
"scripts": {
@@ -14,27 +14,28 @@
1414
"url": "git+https://github.com/creativetimofficial/argon-react-native.git"
1515
},
1616
"dependencies": {
17-
"@react-native-community/masked-view": "0.1.5",
17+
"@react-native-community/masked-view": "0.1.6",
1818
"@react-navigation/bottom-tabs": "^5.0.6",
1919
"@react-navigation/compat": "^5.0.0",
2020
"@react-navigation/drawer": "5.0.0",
2121
"@react-navigation/native": "5.0.0",
2222
"@react-navigation/stack": "5.0.0",
23-
"expo": "^36.0.0",
24-
"expo-asset": "~8.0.0",
25-
"expo-font": "~8.0.0",
23+
"@use-expo/font": "^2.0.0",
24+
"expo": "^37.0.0",
25+
"expo-asset": "~8.1.5",
26+
"expo-font": "~8.1.0",
2627
"galio-framework": "^0.6.3",
2728
"prop-types": "^15.7.2",
2829
"react": "16.9.0",
29-
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
30-
"react-native-gesture-handler": "~1.5.0",
30+
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",
31+
"react-native-gesture-handler": "~1.6.0",
3132
"react-native-modal-dropdown": "^0.7.0",
32-
"react-native-reanimated": "~1.4.0",
33-
"react-native-safe-area-context": "0.6.0",
34-
"react-native-screens": "2.0.0-alpha.12"
33+
"react-native-reanimated": "~1.7.0",
34+
"react-native-safe-area-context": "0.7.3",
35+
"react-native-screens": "~2.2.0"
3536
},
3637
"devDependencies": {
37-
"babel-preset-expo": "^7.0.0"
38+
"babel-preset-expo": "^8.2.1"
3839
},
3940
"keywords": [
4041
"argon react native",

0 commit comments

Comments
 (0)