Add database and Prisma configurations, enhance event and leaderboard components with API integration, and update navigation for session management

This commit is contained in:
Julien Froidefond
2025-12-09 08:24:14 +01:00
parent f57a30eb4d
commit 4486f305f2
41 changed files with 9094 additions and 167 deletions

27
types/next-auth.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
import { Role } from "@/prisma/generated/prisma/client";
import "next-auth";
declare module "next-auth" {
interface User {
id: string;
username: string;
role: Role;
}
interface Session {
user: {
id: string;
email: string;
username: string;
role: Role;
};
}
}
declare module "next-auth/jwt" {
interface JWT {
id: string;
username: string;
role: Role;
}
}