load fast
Build and Deploy Docker Images / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-06-06 09:08:38 +03:30
parent ace6a0b288
commit e68543f869
12 changed files with 255 additions and 248 deletions
+16 -5
View File
@@ -23,6 +23,17 @@ export async function generateMetadata({
try {
const restaurant = await getRestaurant(name)
const title = restaurant.seoTitle || restaurant.name
const logo = restaurant.logo
let iconUrl = defaultIcon
let icon192Url = defaultIcon
let icon512Url = defaultIcon512
if (logo && logo.trim() !== "") {
iconUrl = `/${name}/api/logo?url=${encodeURIComponent(logo)}&size=192`
icon192Url = iconUrl
icon512Url = `/${name}/api/logo?url=${encodeURIComponent(logo)}&size=512`
}
return {
title,
@@ -30,12 +41,12 @@ export async function generateMetadata({
manifest: `/${name}/manifest.webmanifest`,
icons: {
icon: [
{ url: defaultIcon },
{ url: defaultIcon, sizes: "192x192", type: "image/png" },
{ url: defaultIcon512, sizes: "512x512", type: "image/png" },
{ url: iconUrl },
{ url: icon192Url, sizes: "192x192", type: "image/png" },
{ url: icon512Url, sizes: "512x512", type: "image/png" },
],
shortcut: defaultIcon,
apple: defaultIcon,
shortcut: iconUrl,
apple: iconUrl,
},
}
} catch {