diff --git a/.watchmanconfig b/.watchmanconfig index 0967ef4..311847d 100644 --- a/.watchmanconfig +++ b/.watchmanconfig @@ -1 +1,2 @@ {} + diff --git a/App.js b/App.js index b9c9a2d..d932b6d 100644 --- a/App.js +++ b/App.js @@ -1,6 +1,7 @@ -import React from "react"; +import React, {useState} from "react"; import { Image } from "react-native"; import { AppLoading } from "expo"; +import { useFonts } from '@use-expo/font'; import { Asset } from "expo-asset"; import { Block, GalioProvider } from "galio-framework"; import { NavigationContainer } from "@react-navigation/native"; @@ -36,44 +37,85 @@ function cacheImages(images) { }); } -export default class App extends React.Component { - state = { - isLoadingComplete: false - }; +export default props => { + const [isLoadingComplete, setLoading] = useState(false); + let [fontsLoaded] = useFonts({ + 'ArgonExtra': require('./assets/font/argon.ttf'), + }); - render() { - if (!this.state.isLoadingComplete) { - return ( - - ); - } else { - return ( - - - - - - - - ); - } + function _loadResourcesAsync() { + return Promise.all([...cacheImages(assetImages)]); } - _loadResourcesAsync = async () => { - return Promise.all([...cacheImages(assetImages)]); - }; - - _handleLoadingError = error => { + function _handleLoadingError(error) { // In this case, you might want to report the error to your error // reporting service, for example Sentry console.warn(error); }; - _handleFinishLoading = () => { - this.setState({ isLoadingComplete: true }); + function _handleFinishLoading() { + setLoading(true); }; + + if(!fontsLoaded && !isLoadingComplete) { + return ( + + ); + } else if(fontsLoaded) { + return ( + + + + + + + + ); + } } + +// export default class App extends React.Component { +// state = { +// isLoadingComplete: false +// }; + +// render() { +// if (!this.state.isLoadingComplete) { +// return ( +// +// ); +// } else { +// return ( +// +// +// +// +// +// +// +// ); +// } +// } + +// _loadResourcesAsync = async () => { +// return Promise.all([...cacheImages(assetImages)]); +// }; + +// _handleLoadingError = error => { +// // In this case, you might want to report the error to your error +// // reporting service, for example Sentry +// console.warn(error); +// }; + +// _handleFinishLoading = () => { +// this.setState({ isLoadingComplete: true }); +// }; +// } diff --git a/README.md b/README.md index c676058..77f9955 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # [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) - ![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) + ![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) ![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 ## Licensing -- Copyright 2019 Creative Tim (https://www.creative-tim.com/) +- Copyright 2020 Creative Tim (https://www.creative-tim.com/) - Licensed under MIT (https://github.com/creativetimofficial/argon-react-native/blob/master/LICENSE.md) diff --git a/app.json b/app.json index 8e716c0..f3ec751 100644 --- a/app.json +++ b/app.json @@ -3,12 +3,12 @@ "name": "Argon FREE React Native", "slug": "argon-free-react-native", "privacy": "public", - "sdkVersion": "36.0.0", + "sdkVersion": "37.0.0", "platforms": [ "ios", "android" ], - "version": "1.4.0", + "version": "1.5.0", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { @@ -24,6 +24,7 @@ ], "ios": { "supportsTablet": true - } + }, + "description": "Argon React Native, based on Argon Design System. Coded by Creative Tim" } } diff --git a/assets/font/argon.json b/assets/config/argon.json similarity index 100% rename from assets/font/argon.json rename to assets/config/argon.json diff --git a/components/DrawerItem.js b/components/DrawerItem.js index 2fc2d17..36ba698 100644 --- a/components/DrawerItem.js +++ b/components/DrawerItem.js @@ -1,5 +1,5 @@ import React from "react"; -import { StyleSheet, TouchableOpacity } from "react-native"; +import { StyleSheet, TouchableOpacity, Linking } from "react-native"; import { Block, Text, theme } from "galio-framework"; import Icon from "./Icon"; diff --git a/components/Icon.js b/components/Icon.js index eb3e922..075515c 100644 --- a/components/Icon.js +++ b/components/Icon.js @@ -3,7 +3,7 @@ import * as Font from 'expo-font'; import { createIconSetFromIcoMoon } from '@expo/vector-icons'; import { Icon } from 'galio-framework'; -import argonConfig from '../assets/font/argon.json'; +import argonConfig from '../assets/config/argon.json'; const ArgonExtra = require('../assets/font/argon.ttf'); const IconArgonExtra = createIconSetFromIcoMoon(argonConfig, 'ArgonExtra'); diff --git a/package.json b/package.json index 9d17b2f..8dd8a16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "argon-react-native", - "version": "1.4.0", + "version": "1.5.0", "description": "Argon React Native, based on Argon Design System. Coded by Creative Tim", "main": "node_modules/expo/AppEntry.js", "scripts": { @@ -14,27 +14,28 @@ "url": "git+https://github.com/creativetimofficial/argon-react-native.git" }, "dependencies": { - "@react-native-community/masked-view": "0.1.5", + "@react-native-community/masked-view": "0.1.6", "@react-navigation/bottom-tabs": "^5.0.6", "@react-navigation/compat": "^5.0.0", "@react-navigation/drawer": "5.0.0", "@react-navigation/native": "5.0.0", "@react-navigation/stack": "5.0.0", - "expo": "^36.0.0", - "expo-asset": "~8.0.0", - "expo-font": "~8.0.0", + "@use-expo/font": "^2.0.0", + "expo": "^37.0.0", + "expo-asset": "~8.1.5", + "expo-font": "~8.1.0", "galio-framework": "^0.6.3", "prop-types": "^15.7.2", "react": "16.9.0", - "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz", - "react-native-gesture-handler": "~1.5.0", + "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", + "react-native-gesture-handler": "~1.6.0", "react-native-modal-dropdown": "^0.7.0", - "react-native-reanimated": "~1.4.0", - "react-native-safe-area-context": "0.6.0", - "react-native-screens": "2.0.0-alpha.12" + "react-native-reanimated": "~1.7.0", + "react-native-safe-area-context": "0.7.3", + "react-native-screens": "~2.2.0" }, "devDependencies": { - "babel-preset-expo": "^7.0.0" + "babel-preset-expo": "^8.2.1" }, "keywords": [ "argon react native",