feat: fixes and formatter
This commit is contained in:
+46
-47
@@ -1,18 +1,18 @@
|
||||
import { useRouter } from "expo-router";
|
||||
import React from "react";
|
||||
import { StyleSheet, Text, View } from "react-native";
|
||||
import { useRouter } from 'expo-router'
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import AppleSignInButton from "../../components/buttons/AppleSignInButton";
|
||||
import Button from "../../components/buttons/Button";
|
||||
import GoogleSignInButton from "../../components/buttons/GoogleSignInButton";
|
||||
import AppInput from "../../components/inputs/Input";
|
||||
import PublicScreenLayout from "../../components/layout/PublicScreenLayout";
|
||||
import useRegisterForm from "../../hooks/useRegisterForm";
|
||||
import Fonts from "../../styles/Fonts";
|
||||
import Palette from "../../styles/Palette";
|
||||
import AppleSignInButton from '../../components/buttons/AppleSignInButton'
|
||||
import Button from '../../components/buttons/Button'
|
||||
import GoogleSignInButton from '../../components/buttons/GoogleSignInButton'
|
||||
import AppInput from '../../components/inputs/Input'
|
||||
import PublicScreenLayout from '../../components/layout/PublicScreenLayout'
|
||||
import useRegisterForm from '../../hooks/useRegisterForm'
|
||||
import Fonts from '../../styles/Fonts'
|
||||
import Palette from '../../styles/Palette'
|
||||
|
||||
export default function RegisterScreen() {
|
||||
const router = useRouter();
|
||||
const router = useRouter()
|
||||
const {
|
||||
email,
|
||||
setEmail,
|
||||
@@ -25,22 +25,21 @@ export default function RegisterScreen() {
|
||||
signInWithApple,
|
||||
isAppleSignInAvailable,
|
||||
isLoading,
|
||||
} = useRegisterForm();
|
||||
} = useRegisterForm()
|
||||
|
||||
const handleGoBack = () => {
|
||||
if (router.canGoBack?.()) {
|
||||
router.back();
|
||||
return;
|
||||
router.back()
|
||||
return
|
||||
}
|
||||
router.replace("/(public)/login");
|
||||
};
|
||||
router.replace('/(public)/login')
|
||||
}
|
||||
|
||||
return (
|
||||
<PublicScreenLayout title="Inscription" bodyStyle={styles.body}>
|
||||
<Text style={styles.heading}>Rejoignez Minuit</Text>
|
||||
<Text style={styles.subheading}>
|
||||
Créez votre compte en quelques secondes et profitez de l'expérience
|
||||
complète.
|
||||
Créez votre compte en quelques secondes et profitez de l'expérience complète.
|
||||
</Text>
|
||||
|
||||
<View style={styles.form}>
|
||||
@@ -52,10 +51,10 @@ export default function RegisterScreen() {
|
||||
type="email"
|
||||
containerStyle={styles.input}
|
||||
textInputProps={{
|
||||
autoCapitalize: "none",
|
||||
autoComplete: "email",
|
||||
textContentType: "emailAddress",
|
||||
name: "email",
|
||||
autoCapitalize: 'none',
|
||||
autoComplete: 'email',
|
||||
textContentType: 'emailAddress',
|
||||
name: 'email',
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -67,9 +66,9 @@ export default function RegisterScreen() {
|
||||
type="password"
|
||||
containerStyle={styles.input}
|
||||
textInputProps={{
|
||||
autoComplete: "new-password",
|
||||
textContentType: "newPassword",
|
||||
name: "new-password",
|
||||
autoComplete: 'new-password',
|
||||
textContentType: 'newPassword',
|
||||
name: 'new-password',
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -81,9 +80,9 @@ export default function RegisterScreen() {
|
||||
type="password"
|
||||
containerStyle={styles.input}
|
||||
textInputProps={{
|
||||
autoComplete: "new-password",
|
||||
textContentType: "newPassword",
|
||||
name: "confirm-password",
|
||||
autoComplete: 'new-password',
|
||||
textContentType: 'newPassword',
|
||||
name: 'confirm-password',
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -123,34 +122,34 @@ export default function RegisterScreen() {
|
||||
/>
|
||||
</View>
|
||||
</PublicScreenLayout>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
body: {
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
justifyContent: 'center',
|
||||
gap: 24,
|
||||
alignItems: "center",
|
||||
alignItems: 'center',
|
||||
},
|
||||
heading: {
|
||||
fontSize: 28,
|
||||
fontWeight: "700",
|
||||
fontWeight: '700',
|
||||
color: Palette.darkPurple,
|
||||
textAlign: "center",
|
||||
textAlign: 'center',
|
||||
},
|
||||
subheading: {
|
||||
...Fonts.bodySmall,
|
||||
color: "rgba(15, 12, 20, 0.6)",
|
||||
textAlign: "center",
|
||||
color: 'rgba(15, 12, 20, 0.6)',
|
||||
textAlign: 'center',
|
||||
},
|
||||
form: {
|
||||
width: "100%",
|
||||
width: '100%',
|
||||
maxWidth: 420,
|
||||
gap: 16,
|
||||
},
|
||||
input: {
|
||||
width: "100%",
|
||||
width: '100%',
|
||||
},
|
||||
primaryButton: {
|
||||
marginTop: 8,
|
||||
@@ -160,30 +159,30 @@ const styles = StyleSheet.create({
|
||||
gap: 12,
|
||||
},
|
||||
socialDivider: {
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
gap: 8,
|
||||
},
|
||||
dividerLine: {
|
||||
flex: 1,
|
||||
height: StyleSheet.hairlineWidth,
|
||||
backgroundColor: "rgba(15, 12, 20, 0.15)",
|
||||
backgroundColor: 'rgba(15, 12, 20, 0.15)',
|
||||
},
|
||||
dividerText: {
|
||||
...Fonts.tinyBold,
|
||||
textTransform: "uppercase",
|
||||
color: "rgba(15, 12, 20, 0.45)",
|
||||
textTransform: 'uppercase',
|
||||
color: 'rgba(15, 12, 20, 0.45)',
|
||||
},
|
||||
socialButton: {
|
||||
width: "100%",
|
||||
width: '100%',
|
||||
},
|
||||
hint: {
|
||||
marginTop: 12,
|
||||
...Fonts.bodySmall,
|
||||
textAlign: "center",
|
||||
color: "rgba(15, 12, 20, 0.6)",
|
||||
textAlign: 'center',
|
||||
color: 'rgba(15, 12, 20, 0.6)',
|
||||
},
|
||||
secondaryButton: {
|
||||
marginTop: 12,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user