Convert RGPDPage to Typescript
This commit is contained in:
@@ -6,6 +6,7 @@ export interface AuthContextType {
|
||||
loading: boolean;
|
||||
update: () => void;
|
||||
login: (email: string, password: string) => Promise<{ status: number }>;
|
||||
logout: () => Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
+3
-3
@@ -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 () => {
|
||||
@@ -38,4 +38,4 @@ export default function WaitValidationPage() {
|
||||
</div>
|
||||
</div>
|
||||
</Background>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user