Role management not working

I can't make it use the correct context
If someone wants to try it, use this branch
This commit is contained in:
Alexis Leboeuf
2025-12-13 15:17:38 +01:00
parent e43811d6f8
commit 92b1729728
4 changed files with 54 additions and 28 deletions

View File

@@ -8,12 +8,14 @@ import {
import React, { useState } from "react";
import { Button, StyleSheet, View } from "react-native";
import { auth } from "../../firebase_config";
import { useUser } from "../ContextUser";
const DEFAULT_ROLE = "resp";
const LoginScreen: React.FC = () => {
const [email, setEmail] = useState<string>("");
const [password, setPassword] = useState<string>("");
const { setUser, setRole } = useUser();
const handleLogin = async () => {
try {