diff --git a/App.js b/App.js deleted file mode 100644 index 23cd158..0000000 --- a/App.js +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * @format - * @flow strict-local - */ - -import React from 'react'; -import { - SafeAreaView, - StyleSheet, - ScrollView, - View, - Text, - StatusBar, -} from 'react-native'; - -import { - Header, - LearnMoreLinks, - Colors, - DebugInstructions, - ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; - -const App: () => React$Node = () => { - return ( - <> - - - -
- {global.HermesInternal == null ? null : ( - - Engine: Hermes - - )} - - - Step One - - Edit App.js to change this - screen and then come back to see your edits. - - - - See Your Changes - - - - - - Debug - - - - - - Learn More - - Read the docs to discover what to do next: - - - - - - - - ); -}; - -const styles = StyleSheet.create({ - scrollView: { - backgroundColor: Colors.lighter, - }, - engine: { - position: 'absolute', - right: 0, - }, - body: { - backgroundColor: Colors.white, - }, - sectionContainer: { - marginTop: 32, - paddingHorizontal: 24, - }, - sectionTitle: { - fontSize: 24, - fontWeight: '600', - color: Colors.black, - }, - sectionDescription: { - marginTop: 8, - fontSize: 18, - fontWeight: '400', - color: Colors.dark, - }, - highlight: { - fontWeight: '700', - }, - footer: { - color: Colors.dark, - fontSize: 12, - fontWeight: '600', - padding: 4, - paddingRight: 12, - textAlign: 'right', - }, -}); - -export default App; diff --git a/android/app/build.gradle b/android/app/build.gradle index 9e8fa3a..69033c6 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -217,3 +217,9 @@ task copyDownloadableDepsToLibs(type: Copy) { } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) +apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" + +project.ext.vectoricons = [ + iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf', 'Feather.ttf' ] // Name of the font files you want to copy +] + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index eed6be3..c5ea39a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,6 +2,8 @@ package="com.weatherapp"> + + App); diff --git a/ios/weatherapp.xcodeproj/project.pbxproj b/ios/weatherapp.xcodeproj/project.pbxproj index 4c8239c..89fb537 100644 --- a/ios/weatherapp.xcodeproj/project.pbxproj +++ b/ios/weatherapp.xcodeproj/project.pbxproj @@ -16,6 +16,24 @@ 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2DCD954D1E0B4F2C00145EB5 /* weatherappTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* weatherappTests.m */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 9F581B6CB6CB4D14A724F617 /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 39E7104DFE4A4BBB9C37DACA /* Roboto-Bold.ttf */; }; + DD1B7B2DC82D449D97089515 /* Roboto-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D1E751E0FFEA4B88AA6EC96C /* Roboto-Regular.ttf */; }; + AE03F73210B545E2853644B3 /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 981DDE0F0D8D43A990EFBCAA /* AntDesign.ttf */; }; + F064E4648E2E4617893DADD5 /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C32B5BD49FF541309A8DA3EA /* Entypo.ttf */; }; + 8F496A83F67A41B6B91010D9 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C8E74D13AB2B468EA5BF96AD /* EvilIcons.ttf */; }; + 098EA950563E4E67AC1F1EAB /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8CA468DDD8AB4C7EA6476F20 /* Feather.ttf */; }; + 9FAF4A032C83493BB0449022 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5AD9F2F38A154261AAF95257 /* FontAwesome.ttf */; }; + 4985A886F25045C59568D05B /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0431AECCE3FF4F1B9A178C80 /* FontAwesome5_Brands.ttf */; }; + 5B17C8D14F2942438ADBFFCB /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 13E0B49F0C4F4A9EA72AB631 /* FontAwesome5_Regular.ttf */; }; + 2A52A9847077450AA2620D6D /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3FFCF76CF6454723A65675B7 /* FontAwesome5_Solid.ttf */; }; + C16CEBF51DFA48CF8C634838 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D77B11220CB04389B4A31039 /* Fontisto.ttf */; }; + E3318ED0173149D59926F0E0 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D36B7A098B304AB69141BEF6 /* Foundation.ttf */; }; + FDA4E4CB70414EFD9BAF5125 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 89238FC2D07C4EA4AB6A8289 /* Ionicons.ttf */; }; + 9679B4F6A8B14CEA836C24EA /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FB03160C4BF943099288C867 /* MaterialCommunityIcons.ttf */; }; + 82E9A61DC27142D78CC74B89 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AE3A3B4536AD43729BDFD048 /* MaterialIcons.ttf */; }; + 7DC5B26545B647A79E1806E3 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4C8F6C32929F444EA8B043FD /* Octicons.ttf */; }; + 1762475566E74B78ADFDB490 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 19E96DB89C56425794453B98 /* SimpleLineIcons.ttf */; }; + 2732332B85224AF1B068AF38 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 99AFC452B92146F9873ABFC6 /* Zocial.ttf */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -51,6 +69,24 @@ 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = weatherapp/LaunchScreen.storyboard; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; + 39E7104DFE4A4BBB9C37DACA /* Roboto-Bold.ttf */ = {isa = PBXFileReference; name = "Roboto-Bold.ttf"; path = "../assets/fonts/Roboto-Bold.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + D1E751E0FFEA4B88AA6EC96C /* Roboto-Regular.ttf */ = {isa = PBXFileReference; name = "Roboto-Regular.ttf"; path = "../assets/fonts/Roboto-Regular.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 981DDE0F0D8D43A990EFBCAA /* AntDesign.ttf */ = {isa = PBXFileReference; name = "AntDesign.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + C32B5BD49FF541309A8DA3EA /* Entypo.ttf */ = {isa = PBXFileReference; name = "Entypo.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + C8E74D13AB2B468EA5BF96AD /* EvilIcons.ttf */ = {isa = PBXFileReference; name = "EvilIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 8CA468DDD8AB4C7EA6476F20 /* Feather.ttf */ = {isa = PBXFileReference; name = "Feather.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 5AD9F2F38A154261AAF95257 /* FontAwesome.ttf */ = {isa = PBXFileReference; name = "FontAwesome.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 0431AECCE3FF4F1B9A178C80 /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Brands.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 13E0B49F0C4F4A9EA72AB631 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Regular.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 3FFCF76CF6454723A65675B7 /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; name = "FontAwesome5_Solid.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + D77B11220CB04389B4A31039 /* Fontisto.ttf */ = {isa = PBXFileReference; name = "Fontisto.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + D36B7A098B304AB69141BEF6 /* Foundation.ttf */ = {isa = PBXFileReference; name = "Foundation.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 89238FC2D07C4EA4AB6A8289 /* Ionicons.ttf */ = {isa = PBXFileReference; name = "Ionicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + FB03160C4BF943099288C867 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; name = "MaterialCommunityIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + AE3A3B4536AD43729BDFD048 /* MaterialIcons.ttf */ = {isa = PBXFileReference; name = "MaterialIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 4C8F6C32929F444EA8B043FD /* Octicons.ttf */ = {isa = PBXFileReference; name = "Octicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 19E96DB89C56425794453B98 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; + 99AFC452B92146F9873ABFC6 /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = ""; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -140,6 +176,7 @@ 00E356EF1AD99517003FC87E /* weatherappTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, + A8F52904360E492795C7D9A5 /* Resources */, ); indentWidth = 2; sourceTree = ""; @@ -157,6 +194,32 @@ name = Products; sourceTree = ""; }; + A8F52904360E492795C7D9A5 /* Resources */ = { + isa = "PBXGroup"; + children = ( + 39E7104DFE4A4BBB9C37DACA /* Roboto-Bold.ttf */, + D1E751E0FFEA4B88AA6EC96C /* Roboto-Regular.ttf */, + 981DDE0F0D8D43A990EFBCAA /* AntDesign.ttf */, + C32B5BD49FF541309A8DA3EA /* Entypo.ttf */, + C8E74D13AB2B468EA5BF96AD /* EvilIcons.ttf */, + 8CA468DDD8AB4C7EA6476F20 /* Feather.ttf */, + 5AD9F2F38A154261AAF95257 /* FontAwesome.ttf */, + 0431AECCE3FF4F1B9A178C80 /* FontAwesome5_Brands.ttf */, + 13E0B49F0C4F4A9EA72AB631 /* FontAwesome5_Regular.ttf */, + 3FFCF76CF6454723A65675B7 /* FontAwesome5_Solid.ttf */, + D77B11220CB04389B4A31039 /* Fontisto.ttf */, + D36B7A098B304AB69141BEF6 /* Foundation.ttf */, + 89238FC2D07C4EA4AB6A8289 /* Ionicons.ttf */, + FB03160C4BF943099288C867 /* MaterialCommunityIcons.ttf */, + AE3A3B4536AD43729BDFD048 /* MaterialIcons.ttf */, + 4C8F6C32929F444EA8B043FD /* Octicons.ttf */, + 19E96DB89C56425794453B98 /* SimpleLineIcons.ttf */, + 99AFC452B92146F9873ABFC6 /* Zocial.ttf */, + ); + name = Resources; + sourceTree = ""; + path = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -295,6 +358,24 @@ files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 9F581B6CB6CB4D14A724F617 /* Roboto-Bold.ttf in Resources */, + DD1B7B2DC82D449D97089515 /* Roboto-Regular.ttf in Resources */, + AE03F73210B545E2853644B3 /* AntDesign.ttf in Resources */, + F064E4648E2E4617893DADD5 /* Entypo.ttf in Resources */, + 8F496A83F67A41B6B91010D9 /* EvilIcons.ttf in Resources */, + 098EA950563E4E67AC1F1EAB /* Feather.ttf in Resources */, + 9FAF4A032C83493BB0449022 /* FontAwesome.ttf in Resources */, + 4985A886F25045C59568D05B /* FontAwesome5_Brands.ttf in Resources */, + 5B17C8D14F2942438ADBFFCB /* FontAwesome5_Regular.ttf in Resources */, + 2A52A9847077450AA2620D6D /* FontAwesome5_Solid.ttf in Resources */, + C16CEBF51DFA48CF8C634838 /* Fontisto.ttf in Resources */, + E3318ED0173149D59926F0E0 /* Foundation.ttf in Resources */, + FDA4E4CB70414EFD9BAF5125 /* Ionicons.ttf in Resources */, + 9679B4F6A8B14CEA836C24EA /* MaterialCommunityIcons.ttf in Resources */, + 82E9A61DC27142D78CC74B89 /* MaterialIcons.ttf in Resources */, + 7DC5B26545B647A79E1806E3 /* Octicons.ttf in Resources */, + 1762475566E74B78ADFDB490 /* SimpleLineIcons.ttf in Resources */, + 2732332B85224AF1B068AF38 /* Zocial.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ios/weatherapp/Info.plist b/ios/weatherapp/Info.plist index 6c877cb..9f6dd50 100644 --- a/ios/weatherapp/Info.plist +++ b/ios/weatherapp/Info.plist @@ -38,7 +38,7 @@ NSLocationWhenInUseUsageDescription - + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -53,5 +53,7 @@ UIViewControllerBasedStatusBarAppearance + UIAppFonts + diff --git a/package.json b/package.json index 675a65c..4f2be98 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,14 @@ "lint": "eslint ." }, "dependencies": { + "@react-native-community/geolocation": "^2.0.2", + "axios": "^0.19.2", + "date-fns": "^2.15.0", "react": "16.13.1", - "react-native": "0.63.2" + "react-native": "0.63.2", + "react-native-linear-gradient": "^2.5.6", + "react-native-vector-icons": "^7.0.0", + "styled-components": "^5.1.1" }, "devDependencies": { "@babel/core": "^7.8.4", diff --git a/react-native.config.js b/react-native.config.js new file mode 100644 index 0000000..d493c3e --- /dev/null +++ b/react-native.config.js @@ -0,0 +1,7 @@ +module.exports = { + project: { + ios: {}, + android: {}, + }, + assets: ['./assets/fonts/'], +}; diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..b65a32d --- /dev/null +++ b/src/App.js @@ -0,0 +1,15 @@ +import React from 'react'; +import {StatusBar} from 'react-native'; + +import Home from './pages/Home'; + +const App = () => { + return ( + <> + + + + ); +}; + +export default App; diff --git a/src/components/WeatherDetailsItem/index.js b/src/components/WeatherDetailsItem/index.js new file mode 100644 index 0000000..9e7a231 --- /dev/null +++ b/src/components/WeatherDetailsItem/index.js @@ -0,0 +1,30 @@ +import React from 'react'; +import Icon from 'react-native-vector-icons/Feather'; + +import { + Container, + WeatherDetailsItemInfo, + WeatherDetailsItemInfoTitle, + WeatherDetailsItemInfoText, +} from './styles'; + +const WeatherDetailsItem = ({text, title, icon, max}) => { + return ( + + + + {title} + + {text} {max && `/ ${max}º`} + {title === 'Umidade' && '%'} + {title === 'Sensação' && 'º'} + {title === 'Nuvens' && '%'} + {title === 'Vento' && 'm/s'} + {title === 'Pressão' && 'hPa'} + + + + ); +}; + +export default WeatherDetailsItem; diff --git a/src/components/WeatherDetailsItem/styles.js b/src/components/WeatherDetailsItem/styles.js new file mode 100644 index 0000000..9ba57de --- /dev/null +++ b/src/components/WeatherDetailsItem/styles.js @@ -0,0 +1,25 @@ +import styled from 'styled-components/native'; + +export const Container = styled.View` + flex: 1; + flex-direction: row; + align-items: center; + justify-content: center; + padding: 20px; +`; + +export const WeatherDetailsItemInfo = styled.View` + margin-left: 6px; +`; + +export const WeatherDetailsItemInfoTitle = styled.Text` + font-size: 16px; + color: #fff; + font-family: 'Roboto-Bold'; +`; + +export const WeatherDetailsItemInfoText = styled.Text` + font-size: 14px; + color: #f3f3f3; + font-family: 'Roboto-Regular'; +`; diff --git a/src/pages/Home/index.js b/src/pages/Home/index.js new file mode 100644 index 0000000..5aa0cbf --- /dev/null +++ b/src/pages/Home/index.js @@ -0,0 +1,142 @@ +import React, {useState, useEffect, useCallback, useMemo} from 'react'; +import Icon from 'react-native-vector-icons/Feather'; +import {format} from 'date-fns'; +import ptBR from 'date-fns/locale/pt-BR'; +import Geolocation from '@react-native-community/geolocation'; + +import WeatherDetailsItem from '../../components/WeatherDetailsItem'; + +import api from '../../services/api'; + +import { + Container, + Header, + UpdateButton, + DateContainer, + DateContainerText, + WeatherContainer, + LocaleContainer, + LocaleContainerText, + WeatherIcon, + TemperatureContainer, + Temperature, + TemperatureDescription, + WeatherDetails, + Background, +} from './styles'; + +const Home = () => { + const [data, setData] = useState([]); + + const getLocation = useCallback(async () => { + Geolocation.getCurrentPosition(async (position) => { + const {latitude, longitude} = position.coords; + await fetchData(latitude, longitude); + }); + }, [fetchData]); + + const fetchData = useCallback(async (latitude, longitude) => { + const response = await api.get('weather', { + params: { + lon: longitude, + lat: latitude, + appid: 'c1b0e433f08ff834b80bb722bf8cdad8', + lang: 'pt_br', + units: 'metric', + }, + }); + + let date = new Date(); + const formattedDate = format(date, "EEEE',' d 'de' LLLL 'de' yyyy", { + locale: ptBR, + }); + const hours = date.getHours(); + + setData({ + name: response.data.name, + temp: response.data.main.temp.toFixed(0), + description: response.data.weather[0].description, + icon: response.data.weather[0].icon, + date: formattedDate, + hours, + main: response.data.weather[0].main, + wind: response.data.wind.speed, + humidity: response.data.main.humidity, + pressure: response.data.main.pressure, + feels_like: response.data.main.feels_like.toFixed(0), + min: response.data.main.temp_min.toFixed(0), + max: response.data.main.temp_max.toFixed(0), + cloud: response.data.clouds.all, + }); + }, []); + + useEffect(() => { + getLocation(); + }, [getLocation, fetchData]); + + return ( + + +
+ + + {data.date} + + + + + +
+ + + + + {data.name} + + + {data.description} + + + {data.temp}º + + + + + + + + + + + + + + + +
+
+ ); +}; + +export default Home; diff --git a/src/pages/Home/styles.js b/src/pages/Home/styles.js new file mode 100644 index 0000000..e4a3b2e --- /dev/null +++ b/src/pages/Home/styles.js @@ -0,0 +1,81 @@ +import styled from 'styled-components/native'; +import LinearGradient from 'react-native-linear-gradient'; + +export const Background = styled(LinearGradient).attrs((props) => ({ + colors: props.hour > 18 ? ['#7159c1', '#333'] : ['#7159c1', '#19c3fb'], +}))` + flex: 1; +`; + +export const Container = styled.ScrollView` + flex: 1; +`; + +export const Header = styled.View` + flex-direction: row; + align-items: center; + justify-content: space-between; + padding: 20px; +`; + +export const UpdateButton = styled.TouchableOpacity``; + +export const LocaleContainer = styled.View` + flex-direction: row; + align-items: center; +`; + +export const LocaleContainerText = styled.Text` + font-family: 'Roboto-Bold'; + font-size: 32px; + color: #fff; +`; + +export const SearchButton = styled.TouchableOpacity``; + +export const DateContainer = styled.View` + flex-direction: row; + align-items: center; +`; + +export const DateContainerText = styled.Text` + font-size: 16px; + color: #fff; + font-family: 'Roboto-Bold'; +`; + +export const WeatherContainer = styled.View` + align-items: center; + justify-content: center; + margin: 30% 0; +`; + +export const WeatherIcon = styled.Image` + width: 100px; + height: 100px; +`; + +export const TemperatureContainer = styled.View` + flex-direction: row; + align-items: center; + justify-content: center; +`; + +export const Temperature = styled.Text` + font-size: 60px; + color: #fff; + font-family: 'Roboto-Bold'; +`; + +export const TemperatureDescription = styled.Text` + font-size: 18px; + color: #f3f3f3; + font-family: 'Roboto-Regular'; +`; + +export const WeatherDetails = styled.View` + flex-direction: row; + background: rgba(0, 0, 0, 0.09); + border-radius: 8px; + margin: 10px; +`; diff --git a/src/services/api.js b/src/services/api.js new file mode 100644 index 0000000..37c536f --- /dev/null +++ b/src/services/api.js @@ -0,0 +1,7 @@ +import axios from 'axios'; + +const api = axios.create({ + baseURL: 'https://api.openweathermap.org/data/2.5/', +}); + +export default api; diff --git a/yarn.lock b/yarn.lock index f3fde80..323b881 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,7 +40,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.10.4": +"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" integrity sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== @@ -133,7 +133,7 @@ dependencies: "@babel/types" "^7.11.0" -"@babel/helper-module-imports@^7.10.4": +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" integrity sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw== @@ -698,7 +698,7 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.7.0": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== @@ -735,6 +735,28 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@emotion/is-prop-valid@^0.8.8": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== + dependencies: + "@emotion/memoize" "0.7.4" + +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + +"@emotion/stylis@^0.8.4": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@^0.7.4": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" + integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== + "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -1127,6 +1149,11 @@ resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz#e42b1bef12d2415411519fd528e64b593b1363dc" integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ== +"@react-native-community/geolocation@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/geolocation/-/geolocation-2.0.2.tgz#ba8b40f560ead8d014740d1cdea970b33f19312e" + integrity sha512-tTNXRCgnhJBu79mulQwzabXRpDqfh/uaDqfHVpvF0nX4NTpolpy6mvTRiFg7eWFPGRArsnZz1EYp6rHfJWGgEA== + "@sinonjs/commons@^1.7.0": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" @@ -1587,6 +1614,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2" integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA== +axios@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" + integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== + dependencies: + follow-redirects "1.5.10" + babel-eslint@10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" @@ -1640,6 +1674,21 @@ babel-plugin-jest-hoist@^25.5.0: "@babel/types" "^7.3.3" "@types/babel__traverse" "^7.0.6" +"babel-plugin-styled-components@>= 1": + version "1.11.1" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.11.1.tgz#5296a9e557d736c3186be079fff27c6665d63d76" + integrity sha512-YwrInHyKUk1PU3avIRdiLyCpM++18Rs1NgyMXEAQC33rIXs/vro0A+stf4sT0Gf22Got+xRWB8Cm0tw+qkRzBA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= + babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: version "7.0.0-beta.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" @@ -1868,6 +1917,11 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelize@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" + integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -2177,6 +2231,20 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= + +css-to-react-native@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" + integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^4.0.2" + cssom@^0.4.1: version "0.4.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" @@ -2210,6 +2278,11 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +date-fns@^2.15.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.15.0.tgz#424de6b3778e4e69d3ff27046ec136af58ae5d5f" + integrity sha512-ZCPzAMJZn3rNUvvQIMlXhDr4A+Ar07eLeGsGREoWU19a3Pqf5oYa+ccd+B3F6XVtQY6HANMFdOQ8A+ipFnvJdQ== + dayjs@^1.8.15: version "1.8.33" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.33.tgz#18bc4a2b6c1c6f4d67b4c4f2536c0b97e5b766f7" @@ -2222,6 +2295,13 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" +debug@=3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -2947,6 +3027,13 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3182,6 +3269,13 @@ hermes-engine@~0.5.0: resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.5.1.tgz#601115e4b1e0a17d9aa91243b96277de4e926e09" integrity sha512-hLwqh8dejHayjlpvZY40e1aDCDvyP98cWx/L5DhAjSJLH8g4z9Tp08D7y4+3vErDsncPOdf1bxm+zUWpx0/Fxg== +hoist-non-react-statics@^3.0.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -4305,7 +4399,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= -lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.3.0: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.3.0: version "4.17.19" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== @@ -5309,6 +5403,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss-value-parser@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -5428,11 +5527,25 @@ react-devtools-core@^4.6.0: shell-quote "^1.6.1" ws "^7" -react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: +react-is@^16.12.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-native-linear-gradient@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.6.tgz#96215cbc5ec7a01247a20890888aa75b834d44a0" + integrity sha512-HDwEaXcQIuXXCV70O+bK1rizFong3wj+5Q/jSyifKFLg0VWF95xh8XQgfzXwtq0NggL9vNjPKXa016KuFu+VFg== + +react-native-vector-icons@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-7.0.0.tgz#5b92ed363c867645daad48c559e1f99efcfbb813" + integrity sha512-Ku8+dTUAnR9pexRPQqsUcQEZlxEpFZsIy8iOFqVL/3mrUyncZJHtqJyx2cUOmltZIC6W2GI4IkD3EYzPerXV5g== + dependencies: + lodash "^4.17.15" + prop-types "^15.7.2" + yargs "^15.0.2" + react-native@0.63.2: version "0.63.2" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.2.tgz#eaebf3430577b37fbd66ef228a86b3408259ef8e" @@ -5921,6 +6034,11 @@ setprototypeof@1.1.1: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== +shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -6283,12 +6401,28 @@ strip-json-comments@^3.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +styled-components@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.1.1.tgz#96dfb02a8025794960863b9e8e365e3b6be5518d" + integrity sha512-1ps8ZAYu2Husx+Vz8D+MvXwEwvMwFv+hqqUwhNlDN5ybg6A+3xyW1ECrAgywhvXapNfXiz79jJyU0x22z0FFTg== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/traverse" "^7.4.5" + "@emotion/is-prop-valid" "^0.8.8" + "@emotion/stylis" "^0.8.4" + "@emotion/unitless" "^0.7.4" + babel-plugin-styled-components ">= 1" + css-to-react-native "^3.0.0" + hoist-non-react-statics "^3.0.0" + shallowequal "^1.1.0" + supports-color "^5.5.0" + sudo-prompt@^9.0.0: version "9.2.1" resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== -supports-color@^5.3.0: +supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -6937,7 +7071,7 @@ yargs@^14.2.0: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^15.1.0, yargs@^15.3.1: +yargs@^15.0.2, yargs@^15.1.0, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==