diff --git a/app/account/page.tsx b/app/account/page.tsx new file mode 100644 index 0000000..fc90953 --- /dev/null +++ b/app/account/page.tsx @@ -0,0 +1,36 @@ +import { redirect } from "next/navigation"; +import { AuthService, userService, TeamsService } from "@/services"; +import { AccountForm } from "@/components/account/account-form"; + +export default async function AccountPage() { + try { + // Vérifier si l'utilisateur est connecté + const userUuid = await AuthService.getUserUuidFromCookie(); + + if (!userUuid) { + redirect("/login"); + } + + // Récupérer le profil utilisateur + const userProfile = await userService.getUserByUuid(userUuid); + + if (!userProfile) { + redirect("/login"); + } + + // Charger les équipes pour la sélection + const teams = await TeamsService.getTeams(); + + return ( +
- {userInfo.firstName} {userInfo.lastName} -
-- {userInfo.teamName} -
-