mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
feat: reformula landing page e experiência mobile
This commit is contained in:
@@ -26,7 +26,10 @@ export function Logo({
|
||||
alt="OpenMonetis"
|
||||
width={32}
|
||||
height={32}
|
||||
className={cn("object-contain", !colorIcon && "brightness-0 saturate-0")}
|
||||
className={cn(
|
||||
"object-contain",
|
||||
!colorIcon && "brightness-0 saturate-0",
|
||||
)}
|
||||
priority
|
||||
/>
|
||||
<Image
|
||||
|
||||
@@ -3,12 +3,9 @@ import path from "node:path";
|
||||
|
||||
const LOGOS_DIRECTORY = path.join(process.cwd(), "public", "logos");
|
||||
const LOGO_EXTENSIONS = new Set([".png", ".jpg", ".jpeg", ".svg", ".webp"]);
|
||||
let logoOptionsPromise: Promise<string[]> | null = null;
|
||||
|
||||
/**
|
||||
* Loads available logo files from the public/logos directory
|
||||
* @returns Array of logo filenames sorted alphabetically
|
||||
*/
|
||||
export async function loadLogoOptions() {
|
||||
async function readLogoOptions() {
|
||||
try {
|
||||
const files = await readdir(LOGOS_DIRECTORY, { withFileTypes: true });
|
||||
|
||||
@@ -21,3 +18,8 @@ export async function loadLogoOptions() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export async function loadLogoOptions() {
|
||||
logoOptionsPromise ??= readLogoOptions();
|
||||
return logoOptionsPromise;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user