feat: major UI/UX overhaul, snippets system, and performance fixes
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 9m26s

This commit is contained in:
2026-02-16 12:31:40 +01:00
parent 6f62b37c3a
commit a5dba298f3
41 changed files with 1610 additions and 499 deletions

View File

@@ -31,15 +31,15 @@ Object.defineProperty(window, "IntersectionObserver", {
// Polyfill Headers/Request/Response
if (!global.Headers) {
// @ts-ignore
// @ts-expect-error - Polyfilling global Headers for jest environment
global.Headers = Headers;
}
if (!global.Request) {
// @ts-ignore
// @ts-expect-error - Polyfilling global Request for jest environment
global.Request = Request;
}
if (!global.Response) {
// @ts-ignore
// @ts-expect-error - Polyfilling global Response for jest environment
global.Response = Response;
}
@@ -49,13 +49,14 @@ jest.mock('next/server', () => {
return {
...actual,
NextResponse: {
json: (data: any, init?: any) => {
const res = new Response(JSON.stringify(data), init);
json: (data: Record<string, unknown>, init?: unknown) => {
// Use global Response from whatwg-fetch
const res = new (global as any).Response(JSON.stringify(data), init);
res.headers.set('Content-Type', 'application/json');
return res;
},
next: () => ({ headers: new Headers() }),
redirect: (url: string) => ({ headers: new Headers(), status: 302 }),
redirect: (_url: string) => ({ headers: new Headers(), status: 302 }),
},
};
});