Convert RGPDPage to Typescript
This commit is contained in:
@@ -6,6 +6,7 @@ export interface AuthContextType {
|
|||||||
loading: boolean;
|
loading: boolean;
|
||||||
update: () => void;
|
update: () => void;
|
||||||
login: (email: string, password: string) => Promise<{ status: number }>;
|
login: (email: string, password: string) => Promise<{ status: number }>;
|
||||||
|
logout: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export default interface User {
|
|||||||
phone: string | null;
|
phone: string | null;
|
||||||
created_at: string;
|
created_at: string;
|
||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
|
validate: number;
|
||||||
tasks: TaskType[];
|
tasks: TaskType[];
|
||||||
profile_photo_path?: string | null;
|
profile_photo_path?: string | null;
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import styles from "./WaitValidationPage.module.css"
|
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 Button from "../../components/ui/Button/Button";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { AuthContext } from "../../contexts/Auth/AuthContext.js";
|
import { AuthContext } from "../../contexts/Auth/AuthContext.js";
|
||||||
@@ -7,7 +7,7 @@ import { Navigate, useNavigate, Link } from "react-router";
|
|||||||
|
|
||||||
export default function WaitValidationPage() {
|
export default function WaitValidationPage() {
|
||||||
|
|
||||||
const { logout, user } = useContext(AuthContext);
|
const { logout, user } = useContext(AuthContext)!;
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleLogout = async () => {
|
const handleLogout = async () => {
|
||||||
Reference in New Issue
Block a user