This commit is contained in:
2025-11-04 14:45:52 +01:00
parent 02a2333a41
commit d436318bdb
3 changed files with 9 additions and 10 deletions
+4 -7
View File
@@ -28,10 +28,7 @@ const CreatePassword = () => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [, setTooltip] = useGlobal("_tooltip"); const [, setTooltip] = useGlobal("_tooltip");
const passwordRegex = useMemo( const passwordRegex = useMemo(() => /^.{6,}$/, []);
() => /^(?=.*[a-z])(?=.*[A-Z])(?=.*[^A-Za-z0-9]).{8,}$/,
[]
);
const handlePasswordChange = (text) => { const handlePasswordChange = (text) => {
setPassword(text); setPassword(text);
@@ -42,7 +39,7 @@ const CreatePassword = () => {
if (!passwordRegex.test(text)) { if (!passwordRegex.test(text)) {
setPasswordError( setPasswordError(
"Ton mot de passe doit contenir 8 caractères, une majuscule, une minuscule et un caractère spécial." "Ton mot de passe doit contenir au moins 6 caractères."
); );
} else { } else {
setPasswordError(""); setPasswordError("");
@@ -55,7 +52,7 @@ const CreatePassword = () => {
try { try {
if (!isPasswordValid) { if (!isPasswordValid) {
setTooltip({ setTooltip({
text: "Ton mot de passe doit contenir 8 caractères, une majuscule, une minuscule et un caractère spécial.", text: "Ton mot de passe doit contenir au moins 6 caractères.",
type: "error", type: "error",
}); });
return; return;
@@ -128,7 +125,7 @@ const CreatePassword = () => {
fontFamily: FONT_FAMILY.InterRegular, fontFamily: FONT_FAMILY.InterRegular,
}} }}
> >
Utilise au moins 8 caractères pour sécuriser ton compte. Utilise au moins 6 caractères pour sécuriser ton compte.
</Text> </Text>
</View> </View>
<Input <Input
+1 -1
View File
@@ -35,7 +35,7 @@ export default function LandingPage() {
}, []); }, []);
const handleLaunchAdventure = useCallback(() => { const handleLaunchAdventure = useCallback(() => {
navigation.navigate(Routes.Login); navigation.navigate(Routes.Register);
}, [navigation]); }, [navigation]);
const { data: video } = useDataFromRef({ const { data: video } = useDataFromRef({
+4 -2
View File
@@ -148,7 +148,9 @@ const Register = () => {
!selectedCountry && styles.countryButtonPlaceholder, !selectedCountry && styles.countryButtonPlaceholder,
]} ]}
> >
{selectedCountry ? selectedCountry.name : "Choisis ton pays"} {selectedCountry
? selectedCountry.name
: "Sélectionne ton pays"}
</Text> </Text>
</Pressable> </Pressable>
</BlurView> </BlurView>
@@ -262,7 +264,7 @@ const Register = () => {
<View style={styles.modalOverlay}> <View style={styles.modalOverlay}>
<View style={styles.modalContainer}> <View style={styles.modalContainer}>
<View style={styles.modalHeader}> <View style={styles.modalHeader}>
<Text style={styles.modalTitle}>Choisis ton pays</Text> <Text style={styles.modalTitle}>Sélectionne ton pays</Text>
<Pressable onPress={handleCloseModal}> <Pressable onPress={handleCloseModal}>
<Text style={styles.closeText}>Fermer</Text> <Text style={styles.closeText}>Fermer</Text>
</Pressable> </Pressable>