bluejoyq

clear module error and add swipe to nav bar

......@@ -2,8 +2,8 @@
"devToolsPort": 19002,
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 18628,
"packagerPid": 25640,
"expoServerNgrokUrl": "https://ep-ukj.anonymous.searchguide.exp.direct",
"packagerNgrokUrl": "https://packager.ep-ukj.anonymous.searchguide.exp.direct",
"ngrokPid": 25796
"ngrokPid": 23544
}
......
import React from 'react';
import { View, Text} from 'react-native';
import Home from './components/Home/Home';
import AppContainer from './components/AppContainer/AppContainer';
......
import React from 'react';
import { BottomNavigation, Text } from 'react-native-paper';
import {createAppContainer} from 'react-navigation';
import {createMaterialTopTabNavigator} from 'react-navigation-tabs';
import { StatusBar } from 'react-native';
import Home from '../Home/Home';
import Rate from '../Rate/Rate';
const HomeScreen = () => <Home />;
const RateScreen = () => <Rate />;
export default class AppContainer extends React.Component {
constructor(props){
super(props);
this.state = {
index: 0,
routes: [
{ key: 'home', title: '검색', icon: 'magnify' },
{ key: 'rate', title: '평가', icon: 'chart-line' },
],
};
const AppTabNavigator = createMaterialTopTabNavigator (
{
Home: Home,
Rate: Rate
},
{
initialRouteName: 'Home',
tabBarPosition: 'bottom',
tabBarOptions:{
activeTintColor: '#f0edf6',
inactiveTintColor: '#226557',
indicatorStyle: {
backgroundColor: '#f0edf6',
},
style:{
backgroundColor:'#3BAD87',
allowFontScaling : 'true'
},
showIcon: true,
tabStyle: {
height: 60,
},
labelStyle :{
margin : 0,
padding : 0,
fontSize: 15,
},
iconStyle :{
margin : 0,
padding : 0,
}
},
}
_handleIndexChange = index => this.setState({ index });
_renderScene = BottomNavigation.SceneMap({
home: HomeScreen,
rate: RateScreen,
});
render() {
return (
<BottomNavigation style={{marginTop : StatusBar.currentHeight }}
navigationState={this.state}
onIndexChange={this._handleIndexChange}
renderScene={this._renderScene}
/>
);
}
}
\ No newline at end of file
);
const AppContainer = createAppContainer(AppTabNavigator);
export default AppContainer;
\ No newline at end of file
......
import React from 'react';
import { View, Text} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
export default class Home extends React.Component {
class Home extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
static navigationOptions={
title:'검색',
tabBarIcon: ({tintColor}) => (<Icon name="search" color={tintColor} style={{marginLeft:2}} size={20} />),
}
render() {
return(
......@@ -17,4 +22,6 @@ export default class Home extends React.Component {
)
}
}
\ No newline at end of file
}
export default Home;
\ No newline at end of file
......
import React from 'react';
import { View, Text} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
export default class Rate extends React.Component {
class Rate extends React.Component {
constructor(props) {
super(props);
this.state = {
......@@ -9,6 +10,11 @@ export default class Rate extends React.Component {
}
}
static navigationOptions={
title:'평가',
tabBarIcon: ({tintColor})=> (<Icon name="bar-chart-o" color={tintColor} style={{marginLeft:1}} size={20} />),
}
render() {
return(
<View>
......@@ -17,4 +23,6 @@ export default class Rate extends React.Component {
)
}
}
\ No newline at end of file
}
export default Rate;
\ No newline at end of file
......
......@@ -2,6 +2,11 @@
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"1.3.0": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/1.3.0/-/1.3.0-1.3.0.tgz",
"integrity": "sha1-bDfG+ofMRVpTmF9cLHNiE4wSvDA="
},
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
......@@ -1055,6 +1060,44 @@
}
}
},
"@react-navigation/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
"integrity": "sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==",
"requires": {
"hoist-non-react-statics": "^3.3.0",
"path-to-regexp": "^1.7.0",
"query-string": "^6.4.2",
"react-is": "^16.8.6"
}
},
"@react-navigation/native": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-3.6.2.tgz",
"integrity": "sha512-Cybeou6N82ZeRmgnGlu+wzlV3z5BZQR2dmYaNFV1TNLUGHqtvv8E7oNw9uYcz9Ox5LFbiX+FdNTn2d6ZPlK0kg==",
"requires": {
"hoist-non-react-statics": "^3.0.1",
"react-native-safe-area-view": "^0.14.1",
"react-native-screens": "^1.0.0 || ^1.0.0-alpha"
},
"dependencies": {
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
}
}
},
"@types/fbemitter": {
"version": "2.0.32",
"resolved": "https://registry.npmjs.org/@types/fbemitter/-/fbemitter-2.0.32.tgz",
......@@ -3397,11 +3440,6 @@
"resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE="
},
"hammerjs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
"integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE="
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
......@@ -5002,6 +5040,21 @@
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"requires": {
"isarray": "0.0.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"path-type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
......@@ -5206,6 +5259,16 @@
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.1.tgz",
"integrity": "sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA=="
},
"query-string": {
"version": "6.9.0",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.9.0.tgz",
"integrity": "sha512-KG4bhCFYapExLsUHrFt+kQVEegF2agm4cpF/VNc6pZVthIfCc/GK8t8VyNIE3nyXG9DK3Tf2EGkxjR6/uRdYsA==",
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"querystringify": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
......@@ -5427,14 +5490,13 @@
"integrity": "sha512-vbcYxPZlpF5f39GAEUF8kuGQqCNeD3E6zEdvtOq8oCGZunHXlWlKgAS6dgBKCvsHvXgHuMtpvs39VgOp8DaKig=="
},
"react-native-gesture-handler": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.5.0.tgz",
"integrity": "sha512-YUOXHsGLajK1cFReQ4Xh0H9GUTxDW9cUZEVu1q+dVqur2urSKi63KklAFB2l8Neob9nl1E/w0c5hGcBP9FMCIA==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.3.0.tgz",
"integrity": "sha512-ASRFIXBuKRvqlmwkWJhV8yP2dTpvcqVrLNpd7FKVBFHYWr6SAxjGyO9Ik8w1lAxDhMlRP2IcJ9p9eq5X2WWeLQ==",
"requires": {
"hammerjs": "^2.0.8",
"hoist-non-react-statics": "^2.3.1",
"invariant": "^2.2.4",
"prop-types": "^15.7.2"
"invariant": "^2.2.2",
"prop-types": "^15.5.10"
},
"dependencies": {
"hoist-non-react-statics": {
......@@ -5466,6 +5528,11 @@
"react-native-safe-area-view": "^0.12.0"
}
},
"react-native-reanimated": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.4.0.tgz",
"integrity": "sha512-tO7nSNNP+iRLVbkcSS5GXyDBb7tSI02+XuRL3/S39EAr35rnvUy2JfeLUQG+fWSObJjnMVhasUDEUwlENk8IXw=="
},
"react-native-safe-area-view": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.12.0.tgz",
......@@ -5481,6 +5548,19 @@
}
}
},
"react-native-screens": {
"version": "1.0.0-alpha.23",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz",
"integrity": "sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw==",
"requires": {
"debounce": "^1.2.0"
}
},
"react-native-tab-view": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-2.10.0.tgz",
"integrity": "sha512-qgexVz5eO4yaFjdkmn/sURXgVvaBo6pZD/q1eoca96SbPVbaH3WzVhF3bRUfeTHwZkXwznFTpS3JURqIFU8vQA=="
},
"react-native-view-shot": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/react-native-view-shot/-/react-native-view-shot-2.6.0.tgz",
......@@ -5525,11 +5605,53 @@
}
}
},
"react-navigation": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-4.0.10.tgz",
"integrity": "sha512-7PqvmsdQ7HIyxPUMYbd9Uq//VoMdniEOLAOSvIhb/ExtbAt/1INSjUF+RiMWOMCWLTCNvNPRvTz7xy7qwWureg==",
"requires": {
"@react-navigation/core": "^3.5.1",
"@react-navigation/native": "^3.6.2"
}
},
"react-navigation-material-bottom-tabs": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/react-navigation-material-bottom-tabs/-/react-navigation-material-bottom-tabs-2.1.5.tgz",
"integrity": "sha512-MGoVI63ekaU6MxL2FLF9q7n0R9dSGaMzp5PGE4PQCHB3XgN9zAL+gPOWNQFivhqSXHx45sL0oPuxnNOGt9IU3Q=="
},
"react-navigation-tabs": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/react-navigation-tabs/-/react-navigation-tabs-2.5.6.tgz",
"integrity": "sha512-4WivEAsChJ+MuJ6JHxhAUMekHnVIt/zc4y/07KChXD5NBkSE0sk4vmMRndZQ6AP3n/ZihACcfigBAsMoqt0JXA==",
"requires": {
"hoist-non-react-statics": "^3.3.0",
"react-lifecycles-compat": "^3.0.4",
"react-native-safe-area-view": "^0.14.6",
"react-native-tab-view": "^2.9.0"
},
"dependencies": {
"react-lifecycles-compat": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
},
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz",
"integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw=="
}
}
}
}
},
"react-proxy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-1.1.8.tgz",
......@@ -6419,6 +6541,11 @@
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
},
"split-on-first": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
......@@ -6466,6 +6593,11 @@
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
"integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ="
},
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
......
......@@ -8,15 +8,19 @@
"eject": "expo eject"
},
"dependencies": {
"1.3.0": "^1.3.0",
"expo": "^35.0.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "^1.5.0",
"react-native-gesture-handler": "~1.3.0",
"react-native-navigation": "^3.6.0",
"react-native-paper": "^3.2.1",
"react-native-reanimated": "^1.4.0",
"react-native-web": "^0.11.7",
"react-navigation-material-bottom-tabs": "^2.1.5"
"react-navigation": "^4.0.10",
"react-navigation-material-bottom-tabs": "^2.1.5",
"react-navigation-tabs": "^2.5.6"
},
"devDependencies": {
"babel-preset-expo": "^7.1.0"
......