Commit 92b026dd by OuiAtichat

change name to template

parent d2a40d3c
......@@ -8,8 +8,8 @@ import {
} from 'react-navigation';
import { BottomNavigation, BottomNavigationTab } from 'react-native-ui-kitten';
import SmartMeterPage from './screens/Private/SmartMeterPage/SmartMeterPage';
import SmartMeterDetailPage from './screens/Private/SmartMeterPage/SmartMeterDetailPage';
import SmartMeterScreen from './screens/Private/SmartMeterScreen/SmartMeterScreen';
import SmartMeterDetailScreen from './screens/Private/SmartMeterScreen/SmartMeterDetailScreen';
// import HomeScreen from './screens/Private/HomeScreen';
import PageOne from './screens/Private/PageOne';
......@@ -19,11 +19,11 @@ import PageFour from './screens/Private/PageFour';
import AuthLoadingScreen from './screens/Public/AuthLoadingScreen';
import OnboardingPage from './screens/Public/OnboardingPage';
import ForgotPassword from './screens/Public/ForgotPassword';
import LoginPage from './screens/Public/LoginPage';
import Register from './screens/Public/Register';
import SendEmail from './screens/Public/SendEmail';
import OnboardingScreen from './screens/Public/OnboardingScreen';
import ForgotPasswordScreen from './screens/Public/ForgotPasswordScreen';
import LoginScreen from './screens/Public/LoginScreen';
import RegisterScreen from './screens/Public/RegisterScreen';
import SendEmailScreen from './screens/Public/SendEmailScreen';
const defaultNavigationOptions = {
headerStyle: {
......@@ -35,10 +35,10 @@ const defaultNavigationOptions = {
},
};
const HomeStack = createStackNavigator(
const SmartMeterStack = createStackNavigator(
{
Home: SmartMeterPage,
SmartMeterDetail: SmartMeterDetailPage,
SmartMeter: SmartMeterScreen,
SmartMeterDetail: SmartMeterDetailScreen,
},
{
headerLayoutPreset: 'center',
......@@ -156,14 +156,14 @@ const BottomNavigationTabs = props => {
};
const MainApp = createBottomTabNavigator(
{
Home: HomeStack,
SmartMeter: SmartMeterStack,
One: FirstStack,
Two: SecondStack,
Tree: ThirdStack,
Four: FourthStack,
},
{
initialRouteName: 'Home',
initialRouteName: 'SmartMeter',
tabBarComponent: props => <BottomNavigationTabs {...props} />,
tabBarOptions: {
keyboardHidesTabBar: true,
......@@ -174,11 +174,11 @@ const MainApp = createBottomTabNavigator(
const IntroStack = createStackNavigator(
{
Login: LoginPage,
Onboarding: OnboardingPage,
Forget: ForgotPassword,
Register: Register,
SendEmail: SendEmail,
Login: LoginScreen,
Onboarding: OnboardingScreen,
Forget: ForgotPasswordScreen,
Register: RegisterScreen,
SendEmail: SendEmailScreen,
},
{
initialRouteName: 'Login',
......
......@@ -76,7 +76,7 @@ const MainBreaker = {
],
};
export default class SmartMeterDetail extends Component {
export default class SmartMeterDetailScreen extends Component {
static navigationOptions = ({ navigation }) => {
const deviceName = navigation.getParam('deviceName', '');
......
......@@ -39,7 +39,7 @@ const Meter = [
},
];
class SmartMeterPage extends Component {
class SmartMeterScreen extends Component {
static navigationOptions = ({ navigation }) => ({
title: 'Home',
headerLeft: (
......@@ -106,4 +106,4 @@ const mapDispatchToProps = { increment, decrement };
export default connect(
mapStateToProps,
mapDispatchToProps
)(SmartMeterPage);
)(SmartMeterScreen);
......@@ -3,7 +3,7 @@ import { Container, Text, Content, Input, View, Form, Item, Button } from 'nativ
import { theme, color } from '../../constants/Styles';
import { LinearGradient } from 'expo-linear-gradient';
export default class ForgotPassword extends Component {
export default class ForgotPasswordScreen extends Component {
render() {
return (
<Container>
......
......@@ -8,7 +8,7 @@ import { AsyncStorage } from 'react-native';
const required = value => (value ? undefined : 'This is a required field.');
const minChar = value => (value && !/^.{6,}$/i.test(value) ? 'At least 6 characters' : undefined);
export default class LoginPage extends Component {
export default class LoginScreen extends Component {
state = {
isCheck: false,
};
......@@ -27,7 +27,7 @@ export default class LoginPage extends Component {
async submitSuccess() {
console.log('Submit Success!');
await AsyncStorage.setItem('alreadyLaunched', 'true');
this.props.navigation.navigate('Home');
this.props.navigation.navigate('SmartMeter');
}
submitFailed() {
......
......@@ -25,7 +25,7 @@ const pages = [
'Coventry4 is a city with a thousand years of history that has plenty to offer the visiting tourist.',
},
];
export default class OnboardingPage extends Component {
export default class OnboardingScreen extends Component {
render() {
return (
<Swiper>
......
......@@ -16,7 +16,7 @@ const email = value =>
const phoneNum = value => (value && !/^[0][689][0-9]{8}$/i.test(value) ? 'Invalid number' : undefined);
const cfPassword = value => (value && value == this.password ? 'Password not match' : undefined); //how??
export default class Register extends Component {
export default class RegisterScreen extends Component {
state = {
errors: [],
isCheck: false,
......
......@@ -4,7 +4,7 @@ import { Image } from 'react-native';
import { theme } from '../../constants/Styles';
// import { Actions } from 'react-native-router-flux';
import { LinearGradient } from 'expo-linear-gradient';
export default class SendEmail extends Component {
export default class SendEmailScreen extends Component {
render() {
return (
<Container>
......
......@@ -4797,7 +4797,7 @@ react-native-screens@1.0.0-alpha.22:
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.22.tgz#7a120377b52aa9bbb94d0b8541a014026be9289b"
integrity sha512-kSyAt0AeVU6N7ZonfV6dP6iZF8B7Bce+tk3eujXhzBGsLg0VSLnU7uE9VqJF0xdQrHR91ZjGgVMieo/8df9KTA==
"react-native-screens@^1.0.0 || ^1.0.0-alpha", react-native-screens@^1.0.0-alpha.23:
"react-native-screens@^1.0.0 || ^1.0.0-alpha":
version "1.0.0-alpha.23"
resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz#25d7ea4d11bda4fcde2d1da7ae50271c6aa636e0"
integrity sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment