Git Product home page Git Product logo

convene's Introduction

My Skills

๐Ÿ“Š GitHub Stats:

Kofi's GitHub stats

convene's People

Contributors

nklmantey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

convene's Issues

Optimization Opportunities for Auth

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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.