should fix cgu

Signed-off-by: Théo <theo@Mac-Studio.local>
This commit is contained in:
Théo
2025-12-29 13:33:19 +01:00
parent 2697f1918f
commit eeb80925e0
+46 -3
View File
@@ -7,7 +7,6 @@ import { background } from "../assets";
import BorderGradientButton from "../components/BorderGradientButton"; import BorderGradientButton from "../components/BorderGradientButton";
import GradientButton from "../components/GradientButton"; import GradientButton from "../components/GradientButton";
import { Input } from "../components/Input"; import { Input } from "../components/Input";
import AppCheckbox from "../components/AppCheckbox";
import ItemContainer from "../components/ItemContainer/ItemContainer"; import ItemContainer from "../components/ItemContainer/ItemContainer";
import { import {
checkIfPasswordIsStrongEnough, checkIfPasswordIsStrongEnough,
@@ -56,6 +55,10 @@ const CreatePassword = () => {
const isPasswordValid = checkIfPasswordIsStrongEnough({ password }); const isPasswordValid = checkIfPasswordIsStrongEnough({ password });
const handleToggleCguAccepted = () => {
setIsCguAccepted((prev) => !prev);
};
const handleOpenCguModal = () => { const handleOpenCguModal = () => {
setHasScrolledCguToEnd(false); setHasScrolledCguToEnd(false);
setIsCguModalVisible(true); setIsCguModalVisible(true);
@@ -207,9 +210,49 @@ const CreatePassword = () => {
flexDirection: "row", flexDirection: "row",
alignItems: "center", alignItems: "center",
gap: 8, gap: 8,
flexWrap: "wrap",
}} }}
> >
<AppCheckbox selected={isCguAccepted} /> <Pressable
onPress={handleToggleCguAccepted}
style={{
flexDirection: "row",
alignItems: "center",
gap: 8,
}}
>
<View
style={{
width: 17,
height: 17,
alignItems: "center",
justifyContent: "center",
borderWidth: 1,
borderRadius: 100,
borderColor: Palette.white,
}}
>
{isCguAccepted ? (
<View
style={{
width: 9,
height: 9,
borderRadius: 100,
backgroundColor: Palette.white,
}}
/>
) : null}
</View>
<Text
style={{
fontSize: 14,
color: Palette.white,
fontFamily: FONT_FAMILY.InterRegular,
}}
>
J&apos;accepte les
</Text>
</Pressable>
<Pressable onPress={handleOpenCguModal}> <Pressable onPress={handleOpenCguModal}>
<Text <Text
style={{ style={{
@@ -219,7 +262,7 @@ const CreatePassword = () => {
textDecorationLine: "underline", textDecorationLine: "underline",
}} }}
> >
Voir les CGU CGU
</Text> </Text>
</Pressable> </Pressable>
</View> </View>