fix: resolve typescript error and lint warnings
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Successful in 2m5s
Build & Deploy / 🏗️ Build (push) Successful in 5m22s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 4m42s
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Successful in 2m5s
Build & Deploy / 🏗️ Build (push) Successful in 5m22s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Failing after 4m42s
Build & Deploy / 🔔 Notify (push) Successful in 2s
- Fix TS2698 in JsonLd.tsx (spread types) - Clean up unused variable in analytics route
This commit is contained in:
@@ -27,7 +27,7 @@ export async function POST(request: NextRequest) {
|
|||||||
let body;
|
let body;
|
||||||
try {
|
try {
|
||||||
body = await request.json();
|
body = await request.json();
|
||||||
} catch (parseError) {
|
} catch (_parseError) {
|
||||||
logger.warn('Received malformed or empty JSON in analytics proxy');
|
logger.warn('Received malformed or empty JSON in analytics proxy');
|
||||||
return NextResponse.json({ status: 'ignored_bad_payload' }, { status: 200 });
|
return NextResponse.json({ status: 'ignored_bad_payload' }, { status: 200 });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ export default function JsonLd({ id, data }: JsonLdProps) {
|
|||||||
// Ensure @context is present and correctly typed for consumer libraries
|
// Ensure @context is present and correctly typed for consumer libraries
|
||||||
if (!item['@context']) {
|
if (!item['@context']) {
|
||||||
return {
|
return {
|
||||||
...item,
|
...(item as Record<string, any>),
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
};
|
} as WithContext<Thing>;
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user