Convert RGPDPage to Typescript

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-03-18 21:25:56 +01:00
parent 729e78c725
commit 51a1ee1440
3 changed files with 5 additions and 3 deletions
+1
View File
@@ -6,6 +6,7 @@ export interface AuthContextType {
loading: boolean;
update: () => void;
login: (email: string, password: string) => Promise<{ status: number }>;
logout: () => Promise<void>;
}
+1
View File
@@ -9,6 +9,7 @@ export default interface User {
phone: string | null;
created_at: string;
isAdmin: boolean;
validate: number;
tasks: TaskType[];
profile_photo_path?: string | null;
}
@@ -1,5 +1,5 @@
import styles from "./WaitValidationPage.module.css"
import Background from "../../components/Background/Background.jsx";
import Background from "../../components/Background/Background";
import Button from "../../components/ui/Button/Button";
import { useContext } from "react";
import { AuthContext } from "../../contexts/Auth/AuthContext.js";
@@ -7,7 +7,7 @@ import { Navigate, useNavigate, Link } from "react-router";
export default function WaitValidationPage() {
const { logout, user } = useContext(AuthContext);
const { logout, user } = useContext(AuthContext)!;
const navigate = useNavigate();
const handleLogout = async () => {