configure typescript + begin conversion

This commit is contained in:
p2405951
2026-01-28 16:29:41 +01:00
parent 3c71e0c7b2
commit ea6fd94962
14 changed files with 381 additions and 128 deletions
-3
View File
@@ -1,3 +0,0 @@
import { createContext } from "react";
export const AuthContext = createContext(null);
+27
View File
@@ -0,0 +1,27 @@
import { createContext } from "react";
export interface Task {
id: number;
title?: string;
completed?: boolean;
[key: string]: unknown;
}
export interface User {
name: string;
lastname: string;
role: string;
email: string;
phone: string | null;
created_at: string;
tasks: Task[];
}
export interface AuthContextType {
user: User | null;
update: () => void;
}
export const AuthContext = createContext<AuthContextType | null>(null);