Commit 71538c5b by G

removed unused codes and cleanup

parent de89481c
......@@ -7,25 +7,20 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import Box from "@components/bases/Box";
import Text from "@components/bases/Text";
import { Fontisto } from "@expo/vector-icons";
import { LOG } from "@logger";
import { containers } from "@styles/Commons";
import { useCallback, useState } from "react";
import { TouchableOpacity, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { LOG } from "@logger";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
const log = LOG.extend("UserLoginScreen");
const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ navigation }) => {
log.debug("UserLoginScreen");
const insets = useSafeAreaInsets();
const { setAuthenticationData, setUserInformations, login, isAuthenticating } =
useUserAuthenticationContext();
const { login, isAuthenticating } = useUserAuthenticationContext();
// TODO : Remove default value for email and password
const [email, setEmail] = useState("admin");
const [password, setPassword] = useState("admin");
const [error, setError] = useState("");
const submit = useCallback(() => {
login(email, password);
......@@ -81,19 +76,12 @@ const UserLoginScreen: MainStackScreenComponentProps<"userLoginScreen"> = ({ nav
/>
</Box>
</Box>
{error && (
<Text variant={"error"} textAlign={"center"}>
{error}
</Text>
)}
<Box p={"s"}>
<Button
variant={"full"}
textVariants={"primary"}
label="Se connecter"
onPress={() => {
// navigation.popToTop();
// navigation.navigate("bottomTabs");
submit();
}}
isLoading={isAuthenticating}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment