lots of admin stuff. admin layout, user mangement page, new landing page, etc

This commit is contained in:
2025-12-08 07:08:54 -05:00
parent ce05593127
commit 2cd871b529
18 changed files with 807 additions and 80 deletions
+34
View File
@@ -0,0 +1,34 @@
// /types/user.ts
// ---- Roles ----
export type UserRole = "USER" | "ADMIN";
// If you ever add more:
// export type UserRole = "USER" | "ADMIN" | "SUPERADMIN" | "SUSPENDED";
// ---- Core user shapes ----
export interface BaseUser {
id: string;
email: string;
displayName?: string | null;
role: UserRole;
createdAt: string; // ISO string from backend
updatedAt?: string | null; // optional if you expose it
lastLoginAt?: string | null;
}
// What the admin UI works with
export type AdminUser = BaseUser;
// What your auth context might use on the client
export type AuthUser = {
id: string;
email: string;
displayName?: string | null;
role: UserRole;
} | null;
// ---- Payloads / DTOs ----
export interface UpdateUserRolePayload {
role: UserRole;
}