once load splash
This commit is contained in:
@@ -1,47 +1,18 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { buildPwaManifestIcons } from "@/lib/helpers/pwaIcons";
|
||||
import { getRestaurant } from "../lib/getRestaurant";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
export const revalidate = 0;
|
||||
|
||||
function buildManifestIcons(name: string, logo?: string | null) {
|
||||
const default192 = "/icons/web-app-manifest-192x192.png";
|
||||
const default512 = "/icons/web-app-manifest-512x512.png";
|
||||
|
||||
if (logo && logo.trim() !== "") {
|
||||
const logo192 = `/${name}/api/logo?url=${encodeURIComponent(logo)}&size=192`;
|
||||
const logo512 = `/${name}/api/logo?url=${encodeURIComponent(logo)}&size=512`;
|
||||
|
||||
return [
|
||||
{
|
||||
src: logo192,
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
purpose: "any",
|
||||
},
|
||||
{
|
||||
src: logo512,
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any",
|
||||
},
|
||||
];
|
||||
return buildPwaManifestIcons(logo192, logo512);
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
src: default192,
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
purpose: "any",
|
||||
},
|
||||
{
|
||||
src: default512,
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any",
|
||||
},
|
||||
];
|
||||
return buildPwaManifestIcons();
|
||||
}
|
||||
|
||||
export async function GET(
|
||||
|
||||
Reference in New Issue
Block a user