nklmantey / convene Goto Github PK
View Code? Open in Web Editor NEWshared social calendar for you & your friends
shared social calendar for you & your friends
Consolidate repetitive configuration options into a single object to avoid redundancy.
Extract common components and styles to improve reusability and maintainability.
Utilize TypeScript features like type definitions for better type safety and code clarity.
Consider optimizing navigation performance by lazy loading screens if needed, especially for screens with heavy dependencies.
Here is an updated code based on the above recommendations:
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import { TransitionPresets } from '@react-navigation/stack';
import { TouchableOpacity, StyleSheet } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { useNavigation } from '@react-navigation/native';
import LoginScreen from '../screens/auth/LoginScreen';
import SignupScreen from '../screens/auth/SignupScreen';
import ForgotPasswordScreen from '../screens/auth/ForgotPasswordScreen';
const Stack = createStackNavigator();
const headerStyles = StyleSheet.create({
headerStyle: {
borderBottomColor: '#eee',
borderBottomWidth: 1,
},
headerTitleStyle: {
fontFamily: 'InterSoftBold',
fontSize: 24,
color: '#000',
},
});
const commonScreenOptions = {
headerShown: true,
headerStyle: headerStyles.headerStyle,
headerTitleStyle: headerStyles.headerTitleStyle,
...TransitionPresets.SlideFromRightIOS,
};
const renderBackButton = () => {
const { goBack } = useNavigation();
return (
);
};
const AuthNavigation = () => {
return (
<Stack.Navigator screenOptions={commonScreenOptions}>
<Stack.Screen name="login" component={LoginScreen} />
<Stack.Screen
name="signup"
component={SignupScreen}
options={{
title: 'Create Account',
headerLeft: renderBackButton,
...TransitionPresets.ModalPresentationIOS,
}}
/>
<Stack.Screen
name="forgot-password"
component={ForgotPasswordScreen}
options={{
title: 'Forgot Password?',
headerLeft: renderBackButton,
}}
/>
</Stack.Navigator>
);
};
const styles = StyleSheet.create({
backButtonContainer: {
marginLeft: 16,
width: 30,
height: 30,
borderRadius: 8,
backgroundColor: '#eee',
alignItems: 'center',
justifyContent: 'center',
},
});
export default AuthNavigation;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.