feat: reformula landing page e experiência mobile

This commit is contained in:
Felipe Coutinho
2026-03-20 18:35:12 +00:00
parent 33a5d6f5f0
commit 5b8d25d894
41 changed files with 692 additions and 453 deletions

View File

@@ -4,12 +4,9 @@ import { DEFAULT_PAYER_AVATAR } from "@/shared/lib/payers/constants";
const AVATAR_DIRECTORY = path.join(process.cwd(), "public", "avatars");
const AVATAR_EXTENSIONS = new Set([".png", ".jpg", ".jpeg", ".svg", ".webp"]);
let avatarOptionsPromise: Promise<string[]> | null = null;
/**
* Loads available avatar files from the public/avatars directory
* @returns Array of unique avatar filenames sorted alphabetically
*/
export async function loadAvatarOptions() {
async function readAvatarOptions() {
try {
const files = await readdir(AVATAR_DIRECTORY, { withFileTypes: true });
@@ -28,3 +25,12 @@ export async function loadAvatarOptions() {
return [DEFAULT_PAYER_AVATAR];
}
}
/**
* Loads available avatar files from the public/avatars directory
* @returns Array of unique avatar filenames sorted alphabetically
*/
export async function loadAvatarOptions() {
avatarOptionsPromise ??= readAvatarOptions();
return avatarOptionsPromise;
}