chore: lint using react-doctor, update translations, dynamic imports

This commit is contained in:
Amruth Pillai
2026-05-21 09:56:26 +02:00
parent 3596102c63
commit 39e88dd365
208 changed files with 5876 additions and 4778 deletions
+16 -5
View File
@@ -75,17 +75,28 @@ export async function* subscribeResumeUpdated({ resumeId, userId, signal }: Subs
try {
await client.query(`LISTEN ${RESUME_UPDATED_CHANNEL}`);
while (!done) {
const waitForNextEvent = async (): Promise<ResumeUpdatedEvent | null> => {
if (done) return null;
const event = queue.shift();
if (event) {
yield event;
continue;
}
if (event) return event;
await new Promise<void>((resolve) => {
wake = resolve;
});
return waitForNextEvent();
};
async function* streamEvents(): AsyncGenerator<ResumeUpdatedEvent> {
const event = await waitForNextEvent();
if (!event) return;
yield event;
yield* streamEvents();
}
yield* streamEvents();
} finally {
signal?.removeEventListener("abort", onAbort);
client.off("notification", onNotification);