mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 13:54:59 -05:00
fix: don't load banner locally
This commit is contained in:
parent
7497ca7df1
commit
b35f04020d
@ -35,14 +35,6 @@ export async function GET(
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
// Load banner image from filesystem
|
||||
const bannerPath = path.join(
|
||||
process.cwd(),
|
||||
"public",
|
||||
"branding",
|
||||
"bg-banner.png"
|
||||
);
|
||||
const bannerImageData = fs.readFileSync(bannerPath);
|
||||
|
||||
const id = (await params).id;
|
||||
|
||||
@ -68,7 +60,7 @@ export async function GET(
|
||||
textAlign: "center",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundImage: `url(data:image/png;base64,${bannerImageData.toString("base64")})`,
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
fontFamily: "Inter",
|
||||
@ -256,7 +248,7 @@ export async function GET(
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
fontFamily: "Inter",
|
||||
backgroundImage: `url(data:image/png;base64,${bannerImageData.toString("base64")})`,
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
}}
|
||||
|
||||
@ -128,10 +128,6 @@ export async function GET(
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
try {
|
||||
// Load banner image
|
||||
const bannerImageData = await fetch(
|
||||
new URL("/branding/bg-banner.png", request.url)
|
||||
).then((res) => res.arrayBuffer());
|
||||
|
||||
const id = (await params).id;
|
||||
|
||||
@ -158,7 +154,7 @@ export async function GET(
|
||||
textAlign: "center",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
backgroundImage: `url(data:image/png;base64,${Buffer.from(bannerImageData).toString("base64")})`,
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
fontFamily: "Inter",
|
||||
@ -226,7 +222,7 @@ export async function GET(
|
||||
position: "relative",
|
||||
overflow: "hidden",
|
||||
fontFamily: "Inter",
|
||||
backgroundImage: `url(data:image/png;base64,${Buffer.from(bannerImageData).toString("base64")})`,
|
||||
backgroundImage: `url(${new URL("/branding/bg-banner.png", request.url).toString()})`,
|
||||
backgroundSize: "cover",
|
||||
backgroundPosition: "center",
|
||||
}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user