feat(market): add Minha Intenções tab with panel, hook, and badge

- Introduced "Minhas Intenções" tab visible only to logged-in users.
- Integrated MyPurchaseIntentionsPanel and useMyPurchaseIntentions hook.
- Added tab badge showing count of pending intentions.
- Extended session API to include user’s main character for downstream features.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-07 17:25:51 -03:00
1 parent f35fee944d
commit 7f42def478
55 files changed
+4906 -95

No files matched your search

+15
View File
@@ -69,6 +69,21 @@ export async function getUserCharacters(userId: number): Promise<Character[]> {
});
}
/**
* Busca personagem principal de um usuário
*/
export async function getMainCharacter(userId: number): Promise<Character | null> {
return await prisma.userCharacter.findFirst({
where: {
user_id: userId,
is_main: true,
},
orderBy: [
{ created_at: "asc" },
],
});
}
/**
* Busca personagem principal de um usuário em um servidor específico
*/