continue generating flow, add backend connection on main tabs

This commit is contained in:
Thomas Demirdjian
2025-08-28 17:18:28 +02:00
parent 0ca7544005
commit bb7b35626f
110 changed files with 1701 additions and 3408 deletions
+14 -5
View File
@@ -1,4 +1,4 @@
import { View, Text } from "react-native";
import { View } from "react-native";
import React from "react";
import Page from "../../layouts/Page";
import { background } from "../../assets";
@@ -9,6 +9,7 @@ import BorderGradientButton from "../../components/BorderGradientButton";
import { SheetManager } from "react-native-actions-sheet";
import { navigate } from "../../navigation/NavigationService";
import { Routes } from "../../navigation";
import { useUserData } from "../../providers/UserDataProvider";
const SETTINGS = [
{
@@ -42,6 +43,17 @@ const SETTINGS = [
];
const Settings = () => {
const { onSignOut } = useUserData();
const handleSignOut = async () => {
try {
await onSignOut();
} catch (e) {
console.log("Sign out error", e?.message);
} finally {
navigate(Routes.Login);
}
};
return (
<Page
headerType="NAVIGATION"
@@ -65,10 +77,7 @@ const Settings = () => {
))}
</View>
<View style={{ width: "80%", gap: 5, alignSelf: "center" }}>
<BorderGradientButton
title="Déconnexion"
onPress={() => navigate(Routes.Login)}
/>
<BorderGradientButton title="Déconnexion" onPress={handleSignOut} />
<BorderGradientButton
title="Supprimer mon profil"
titleStyle={{