Skip to content

Commit

Permalink
Version 1.0.2 (#103)
Browse files Browse the repository at this point in the history
* reordering imports

* Update README.md

* Bump axios from 0.19.2 to 0.21.1

Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](axios/axios@v0.19.2...v0.21.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* colorcoded map marker colors by earthquake mag

* upgrades

* expo upgrade

* updates

* remove unnecessary file

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
tahmidefaz and dependabot-preview[bot] authored Jan 15, 2021
1 parent db83338 commit a147dbb
Show file tree
Hide file tree
Showing 16 changed files with 4,512 additions and 4,118 deletions.
4 changes: 2 additions & 2 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {Provider as StoreProvider} from 'react-redux';
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import AppNav from './src/components/AppNav';

import { loadCurrentLocation, setMapRegion } from './src/actions';
import store from './src/store/configureStore';
import { loadCurrentLocation, setMapRegion } from './src/redux/actions';
import store from './src/redux/store/configureStore';

const theme = {
...DefaultTheme,
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Quakey
A cross-platform mobile app for real-time earthquake information.
Developed using the [React Native framework](https://facebook.github.io/react-native/) with the [expo](https://expo.io/) toolchain.
Compatible with the ios and the android platform. **App is currently awaiting review for Play Store release.**. Quakey is currently at stable **Version 1.x**
Compatible with the ios and the android platform. Quakey is currently at stable **Version 1.x**

[![Play Store Button](../assets/google-play-badge-mini.png?raw=true)](https://play.google.com/store/apps/details?id=com.quakey.android)

## General Information
Quakey currently has two screens. One that provides the earthquake data in list view and another that provides the data in map view. At the moment, Quakey uses the 2.5+ daily earthquakes api endpoint from USGS. This endpoint provides information on US earthquakes that are at least 2.5 in magnitude and on worlwide earthquakes that are at least 4.5 in magnitude.
Expand Down Expand Up @@ -43,6 +45,7 @@ viewing the location of the earthquakes on a map
3. Clone or download this repo
4. On your computer, navigate into the repo using the terminal
5. Rename the file ``app.example.json`` to ``app.json``
5. Run the command ``expo start``
6. Run ``npm install``
7. Run ``expo start``

*Note: checkout [expo](https://expo.io/) website for setup troubleshooting*
9 changes: 5 additions & 4 deletions app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"ios",
"android"
],
"version": "1.0.1",
"version": "1.0.2",
"orientation": "portrait",
"icon": "./assets/quakey_icon.png",
"splash": {
"image": "./assets/splash.png",
"image": "./assets/quakey-splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0
Expand All @@ -26,7 +26,8 @@
},
"android": {
"package": "com.quakey.android",
"versionCode": 1
"versionCode": 2,
"permissions": ["ACCESS_FINE_LOCATION"]
}
}
}
8,564 changes: 4,473 additions & 4,091 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
"eject": "expo eject"
},
"dependencies": {
"axios": "^0.19.2",
"expo": "^38.0.0",
"expo-cli": "^3.22.3",
"expo-status-bar": "^1.0.0",
"expo-web-browser": "~8.3.1",
"react": "16.11.0",
"axios": "^0.21.1",
"expo": "^40.0.0",
"expo-cli": "^4.0.17",
"expo-status-bar": "~1.0.3",
"expo-web-browser": "~8.6.0",
"react": "16.13.1",
"react-axios": "^2.0.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-maps": "0.27.1",
"react-native-paper": "^4.0.1",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-preset-expo": "^8.2.3"
"babel-preset-expo": "8.3.0"
},
"private": true
}
2 changes: 1 addition & 1 deletion src/components/AppNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
import { View } from 'react-native';
import { useDispatch } from 'react-redux';
import { BottomNavigation } from 'react-native-paper';
import { loadQuakeData } from '../actions';
import { loadQuakeData } from '../redux/actions';

import Header from './Header';
import ListItems from './ListItems';
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';
import { Appbar, Menu, Button, Checkbox } from 'react-native-paper';
import { Appbar, Menu, Checkbox } from 'react-native-paper';
import { StatusBar } from 'expo-status-bar';
import { useDispatch } from 'react-redux';

import { showFaultLines } from '../actions'
import { showFaultLines } from '../redux/actions'

const Header = (props) => {
const [visible, setVisible] = React.useState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ListItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ScrollView, RefreshControl } from 'react-native';
import { List } from 'react-native-paper';
import { useSelector, useDispatch } from 'react-redux';

import { loadQuakeData, setDialogStatus } from '../actions';
import { loadQuakeData, setDialogStatus } from '../redux/actions';

import { markerDescription, calculateDistance, listItemColor } from '../misc/support_functions';
import QuakeDialog from './QuakeDialog';
Expand Down
8 changes: 3 additions & 5 deletions src/components/MapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import MapView, { Polyline, Marker } from 'react-native-maps';
import { useSelector, useDispatch } from 'react-redux';

import { mapstyle } from './mapstyle';
import { setMapDialogStatus, setMapRegion } from '../actions';
import { markerDescription, calculateDistance } from '../misc/support_functions';
import { setMapDialogStatus, setMapRegion } from '../redux/actions';
import { markerDescription, calculateDistance, markerColor } from '../misc/support_functions';
import QuakeDialogMap from './QuakeDialogMap';

import fault_data from '../misc/fault_data';
Expand Down Expand Up @@ -44,9 +44,6 @@ const MapContainer = () => {
return arr
}

const addFaultLines = (currentRegion) => {
dispatch(setMapRegion(currentRegion.latitude, currentRegion.longitude, currentRegion.latitudeDelta, currentRegion.longitudeDelta));
}

return(
<View>
Expand All @@ -71,6 +68,7 @@ const MapContainer = () => {
{
state.quakeData.map(info =>
<Marker
pinColor={markerColor(info.properties.mag)}
coordinate={{
latitude: info.geometry.coordinates[1],
longitude: info.geometry.coordinates[0],
Expand Down
2 changes: 1 addition & 1 deletion src/components/QuakeDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native';
import * as WebBrowser from 'expo-web-browser';
import { useSelector, useDispatch } from 'react-redux';

import { setDialogStatus, setMapRegion } from '../actions';
import { setDialogStatus, setMapRegion } from '../redux/actions';
import { listItemColor, convertDMS, dateParser } from '../misc/support_functions';


Expand Down
2 changes: 1 addition & 1 deletion src/components/QuakeDialogMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native';
import * as WebBrowser from 'expo-web-browser';
import { useSelector, useDispatch } from 'react-redux';

import { setMapDialogStatus, setMapRegion } from '../actions';
import { setMapDialogStatus, setMapRegion } from '../redux/actions';
import { listItemColor, convertDMS, dateParser } from '../misc/support_functions';


Expand Down
10 changes: 10 additions & 0 deletions src/misc/support_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ export const listItemColor = (mag) => {
}
}

export const markerColor = (mag) => {
if (mag > 5.5){
return 'red'
} else if (mag >=4.5 && mag <= 5.5) {
return 'orange';
} else {
return 'green';
}
}

const toDegreesMinutesAndSeconds = (coordinate) => {
const absolute = Math.abs(coordinate);
const degrees = Math.floor(absolute);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a147dbb

Please sign in to comment.