chore: add parrainage
This commit is contained in:
@@ -12,12 +12,21 @@ import { useTheme } from "../../context/ThemeContext";
|
||||
import { shadows } from "../../theme/shadows";
|
||||
import { useAuth } from "../../auth/AuthContext";
|
||||
import { getAllCommands } from "../../api/api_admin";
|
||||
import { getAllDeliveryPersonsWithDetails } from "../../api/api_cabine";
|
||||
import { getAllDeliveryPersonsWithDetails, registerCabinePushToken, unregisterCabinePushToken } from "../../api/api_cabine";
|
||||
import { getExpoPushToken } from "../../utils/pushTokenUtils";
|
||||
import LoadingSpinner from "../../components/ui/LoadingSpinner";
|
||||
|
||||
export default function DashboardScreen() {
|
||||
const { colors } = useTheme();
|
||||
const { username } = useAuth();
|
||||
|
||||
// Enregistrement push token cabine au montage
|
||||
useEffect(() => {
|
||||
getExpoPushToken().then((token) => {
|
||||
if (token) registerCabinePushToken(token);
|
||||
});
|
||||
return () => { unregisterCabinePushToken(); };
|
||||
}, []);
|
||||
const [stats, setStats] = useState<
|
||||
Array<{
|
||||
label: string;
|
||||
|
||||
Reference in New Issue
Block a user