diff --git a/src/features/auth/slice.ts b/src/features/auth/slice.ts
index aa5484a..a1d92bd 100644
--- a/src/features/auth/slice.ts
+++ b/src/features/auth/slice.ts
@@ -31,7 +31,9 @@ export const authSlice = createSlice({
state.token = action.payload.tokens;
},
logout: (state) => {
- state = initialState;
+ state.isAuthenticated = false;
+ state.token = {} as Token;
+ state.user = {} as UserData;
},
},
});
diff --git a/src/screens/UserProfileScreen.tsx b/src/screens/UserProfileScreen.tsx
index 099b94c..18b01d1 100644
--- a/src/screens/UserProfileScreen.tsx
+++ b/src/screens/UserProfileScreen.tsx
@@ -1,176 +1,147 @@
-import { useUserAuthenticationContext } from "@/contexts/UserAuthenticationContext";
-import BarWithBeasyAndNotificationsIcon from "@components/BarWithBeasyAndNotificationsIcon";
-import Button from "@components/Button";
-import Box from "@components/bases/Box";
-import Text from "@components/bases/Text";
-import WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight from "@components/wrappers/WrapperWithDefaultBeasyBackgroundAndSafeAreaTopLeftRight";
+import { asp as g } from "@asp/asp";
+import { BarnoinPayBackground } from "@components/BarnoinPayBackground";
+import BeasyLogoIcon from "@components/BeasyLogoIcon";
+import * as Button from "@components/ButtonNew";
+import Ionicons from "@expo/vector-icons/Ionicons";
import { LOG } from "@logger";
-import Card from "@re-card";
+import { Text, View } from "react-native";
+import { useDispatch } from "react-redux";
+import { useUserAuthenticationContext } from "@/contexts/UserAuthenticationContext";
+import { logout } from "@/features/auth/slice";
const log = LOG.extend("UserProfileScreen");
const UserProfileScreen = () => {
log.verbose("UserProfileScreen");
- const { logout } = useUserAuthenticationContext();
+ const dispatch = useDispatch();
const { userInformations } = useUserAuthenticationContext();
return (
-
- <>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
- {userInformations.first_name} {userInformations.last_name}
-
- {userInformations.email}
-
-
-
-
- Utilisateur
+
+
+ {userInformations.first_name} {userInformations.last_name}
- {userInformations.username}
-
-
+ {userInformations.email}
+
+
+
+ Utilisateur
+ {userInformations.username}
+
+
-
+ dispatch(logout())}
+ >
+ Deconnexion
+
- Informations sur le marchand
- Informations sur le marchand
+
+
-
-
- Identifiant
-
-
- {userInformations.marchand.marchand_id}
-
-
-
-
- Entreprise
-
- {userInformations.marchand.nom}
-
-
-
- Code
-
- {userInformations.marchand.code}
-
-
-
- Addresse
-
- {userInformations.marchand.adresse}
-
-
-
- Url succès
-
- {userInformations.marchand.url_succes}
-
-
-
- Url échec
-
- {userInformations.marchand.url_echec}
-
-
-
- >
-
+ Identifiant
+ {userInformations.marchand.marchand_id}
+
+
+ Entreprise
+ {userInformations.marchand.nom}
+
+
+ Code
+ {userInformations.marchand.code}
+
+
+ Addresse
+ {userInformations.marchand.adresse}
+
+
+ Url succès
+ {userInformations.marchand.url_succes}
+
+
+ Url échec
+ {userInformations.marchand.url_echec}
+
+
+
+
);
};