mirror of
https://github.com/lemeow125/Reactnative-notesapp.git
synced 2025-04-19 00:11:25 +08:00
Added more missing pages
This commit is contained in:
parent
cf28bae964
commit
6bb9897e31
7 changed files with 92 additions and 69 deletions
9
App.tsx
9
App.tsx
|
@ -2,11 +2,14 @@ import 'react-native-gesture-handler';
|
|||
import {NavigationContainer} from '@react-navigation/native';
|
||||
import {createDrawerNavigator} from '@react-navigation/drawer';
|
||||
|
||||
import CustomDrawerContent from './src/Components/Drawer/DrawerScreenSettings/CustomDrawerContent/CustomDrawerContent';
|
||||
import DrawerScreenSettings from './src/Components/Drawer/DrawerScreenSettings/DrawerScreenSettings';
|
||||
|
||||
import Home from './src/Routes/Home/Home';
|
||||
import UserInfo from './src/Routes/UserInfo/UserInfo';
|
||||
import AddNote from './src/Routes/AddNote/AddNote';
|
||||
import CustomDrawerContent from './src/Components/Drawer/DrawerScreenSettings/CustomDrawerContent/CustomDrawerContent';
|
||||
import DrawerScreenSettings from './src/Components/Drawer/DrawerScreenSettings/DrawerScreenSettings';
|
||||
import Login from './src/Routes/Login/Login';
|
||||
import Register from './src/Routes/Register/Register';
|
||||
|
||||
const Drawer = createDrawerNavigator();
|
||||
|
||||
|
@ -20,6 +23,8 @@ export default function App() {
|
|||
<Drawer.Screen name="Home" component={Home} />
|
||||
<Drawer.Screen name="Add Note" component={AddNote} />
|
||||
<Drawer.Screen name="User Info" component={UserInfo} />
|
||||
<Drawer.Screen name="Login" component={Login} />
|
||||
<Drawer.Screen name="Register" component={Register} />
|
||||
</Drawer.Navigator>
|
||||
</NavigationContainer>
|
||||
);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
plugins:[
|
||||
'react-native-reanimated/plugin',
|
||||
'react-native-reanimated/plugin'
|
||||
],
|
||||
};
|
||||
|
|
|
@ -16,68 +16,64 @@ import AppIcon from '../../../Icons/AppIcon/AppIcon';
|
|||
|
||||
export default function CustomDrawerContent(props: {}) {
|
||||
const navigation = useNavigation<RootDrawerParamList>();
|
||||
let width = 224;
|
||||
const width = 224;
|
||||
return (
|
||||
<DrawerContentScrollView {...props}>
|
||||
<View>
|
||||
<View style={{...styles.flex_row, ...{marginLeft: 16}}}>
|
||||
<AppIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>
|
||||
Clip Notes
|
||||
</Text>
|
||||
</View>
|
||||
<ButtonAlignLeft
|
||||
color="Blue"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Home');
|
||||
}}>
|
||||
<HomeIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Home</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Green"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Add Note');
|
||||
}}>
|
||||
<AddIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>
|
||||
Add Note
|
||||
</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Green"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Login');
|
||||
}}>
|
||||
<LoginIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Login</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Yellow"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('User Info');
|
||||
}}>
|
||||
<UserIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>
|
||||
User Info
|
||||
</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Yellow"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Register');
|
||||
}}>
|
||||
<SignupIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>
|
||||
Register
|
||||
</Text>
|
||||
</ButtonAlignLeft>
|
||||
<View
|
||||
style={{
|
||||
...styles.flex_row,
|
||||
...{justifyContent: 'center'},
|
||||
}}>
|
||||
<AppIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>
|
||||
Clip Notes
|
||||
</Text>
|
||||
</View>
|
||||
<ButtonAlignLeft
|
||||
color="Blue"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Home');
|
||||
}}>
|
||||
<HomeIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Home</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Green"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Add Note');
|
||||
}}>
|
||||
<AddIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Add Note</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Green"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Login');
|
||||
}}>
|
||||
<LoginIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Login</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Yellow"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('User Info');
|
||||
}}>
|
||||
<UserIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>User Info</Text>
|
||||
</ButtonAlignLeft>
|
||||
<ButtonAlignLeft
|
||||
color="Yellow"
|
||||
width={width}
|
||||
onPress={() => {
|
||||
navigation.navigate('Register');
|
||||
}}>
|
||||
<SignupIcon size={32} color="white" />
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Register</Text>
|
||||
</ButtonAlignLeft>
|
||||
</DrawerContentScrollView>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,12 +5,6 @@ import Background from '../../Components/Background/Background';
|
|||
import {useNavigation} from '@react-navigation/native';
|
||||
import {RootDrawerParamList} from '../../Interfaces/Interfaces';
|
||||
import AppIcon from '../../Components/Icons/AppIcon/AppIcon';
|
||||
import Button from '../../Components/Buttons/ButtonCentered/ButtonCentered';
|
||||
import HomeIcon from '../../Components/Icons/HomeIcon/HomeIcon';
|
||||
import AddIcon from '../../Components/Icons/AddIcon/AddIcon';
|
||||
import UserIcon from '../../Components/Icons/UserIcon/UserIcon';
|
||||
import LoginIcon from '../../Components/Icons/LoginIcon/LoginIcon';
|
||||
import SignupIcon from '../../Components/Icons/SignupIcon/SignupIcon';
|
||||
|
||||
export interface props {}
|
||||
|
||||
|
|
14
src/Routes/Login/Login.tsx
Normal file
14
src/Routes/Login/Login.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
import * as React from 'react';
|
||||
import {View, Text} from 'react-native';
|
||||
import styles from '../../styles';
|
||||
import Background from '../../Components/Background/Background';
|
||||
|
||||
export interface props {}
|
||||
|
||||
export default function Login(props: props) {
|
||||
return (
|
||||
<Background>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Login</Text>
|
||||
</Background>
|
||||
);
|
||||
}
|
14
src/Routes/Register/Register.tsx
Normal file
14
src/Routes/Register/Register.tsx
Normal file
|
@ -0,0 +1,14 @@
|
|||
import * as React from 'react';
|
||||
import {View, Text} from 'react-native';
|
||||
import styles from '../../styles';
|
||||
import Background from '../../Components/Background/Background';
|
||||
|
||||
export interface props {}
|
||||
|
||||
export default function Register(props: props) {
|
||||
return (
|
||||
<Background>
|
||||
<Text style={{...styles.text_white, ...{fontSize: 32}}}>Register</Text>
|
||||
</Background>
|
||||
);
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"extends": "@tsconfig/react-native/tsconfig.json"
|
||||
"extends": "@tsconfig/react-native/tsconfig.json",
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue