once load splash
This commit is contained in:
@@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user