once load splash

This commit is contained in:
hamid zarghami
2026-06-06 10:04:47 +03:30
parent e948b00f55
commit 2ae99faca9
12 changed files with 201 additions and 64 deletions
+8 -7
View File
@@ -5,6 +5,7 @@ import { getRestaurant } from './lib/getRestaurant'
import { notFound } from 'next/navigation'
import CartChecker from '@/components/CartChecker'
import ActiveChecker from '@/components/ActiveChecker'
import { PWA_ICON_192, PWA_ICON_512 } from '@/lib/helpers/pwaIcons'
export const dynamic = 'force-dynamic'
export const revalidate = 0
@@ -17,8 +18,8 @@ export async function generateMetadata({
params: Promise<LayoutParams>
}): Promise<Metadata> {
const { name } = await params
const defaultIcon = "/icons/web-app-manifest-192x192.png"
const defaultIcon512 = "/icons/web-app-manifest-512x512.png"
const defaultIcon = PWA_ICON_192
const defaultIcon512 = PWA_ICON_512
try {
const restaurant = await getRestaurant(name)
@@ -56,12 +57,12 @@ export async function generateMetadata({
manifest: `/${name}/manifest.webmanifest`,
icons: {
icon: [
{ url: "/icons/web-app-manifest-192x192.png" },
{ url: "/icons/web-app-manifest-192x192.png", sizes: "192x192", type: "image/png" },
{ url: "/icons/web-app-manifest-512x512.png", sizes: "512x512", type: "image/png" },
{ url: PWA_ICON_192 },
{ url: PWA_ICON_192, sizes: "192x192", type: "image/png" },
{ url: PWA_ICON_512, sizes: "512x512", type: "image/png" },
],
shortcut: "/icons/web-app-manifest-192x192.png",
apple: "/icons/web-app-manifest-192x192.png",
shortcut: PWA_ICON_192,
apple: PWA_ICON_192,
},
}
}