Skip to content

Commit f569269

Browse files
committed
fix: remove unoptimized attribute from image
1 parent b5656fe commit f569269

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

components/store/ExtensionCard.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ export function ExtensionCard({ extension, index }: ExtensionCardProps) {
133133
height={48}
134134
className="w-full h-full object-contain"
135135
onError={() => setIconError(true)}
136-
unoptimized
137136
/>
138137
) : (
139138
<div className="w-full h-full rounded-[14px] bg-gray-50 dark:bg-white/5 border border-gray-100 dark:border-white/5 flex items-center justify-center">

components/store/ExtensionDetailClient.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ export function ExtensionDetailClient({
163163
height={128}
164164
className="w-full h-full object-contain group-hover:scale-105 transition-transform duration-500"
165165
onError={() => setIconError(true)}
166-
unoptimized
167166
/>
168167
) : (
169168
<svg

next.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const config = {
4040
hostname: "raw.githubusercontent.com",
4141
},
4242
],
43+
// Allow SVG images through the optimization pipeline (extension icons may be SVG).
44+
// CSP headers (script-src 'none'; frame-src 'none'; sandbox;) are applied automatically.
45+
dangerouslyAllowSVG: true,
4346
},
4447
async rewrites() {
4548
return [

scripts/sync-extensions.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const WORKER_URL = (process.env.WORKER_URL ?? "https://gopeed.com").replace(
1616
const GITHUB_TOKEN = process.env.GITHUB_TOKEN;
1717
const PAGE_SIZE = Math.min(
1818
5,
19-
Math.max(1, parseInt(process.env.PAGE_SIZE ?? "5", 5)),
19+
Math.max(1, parseInt(process.env.PAGE_SIZE ?? "5", 10)),
2020
);
2121

2222
const endpoint = `${WORKER_URL}/api/extensions/sync`;

0 commit comments

Comments
 (0)